mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-11-16 12:34:43 +00:00
gdbsupport: add iterator_range::empty
Add iterator_range::empty, indicating if the range is empty. This is used in the following patch. Change-Id: I1e6c873e635c2bb0ce5aaea2a176470970f6d7ac Approved-By: Tom Tromey <tom@tromey.com>
This commit is contained in:
@@ -56,6 +56,10 @@ struct iterator_range
|
||||
std::size_t size () const
|
||||
{ return std::distance (m_begin, m_end); }
|
||||
|
||||
/* Return true if this range is empty. */
|
||||
bool empty () const
|
||||
{ return m_begin == m_end; }
|
||||
|
||||
private:
|
||||
IteratorType m_begin, m_end;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user