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:
Simon Marchi
2025-09-19 16:27:01 -04:00
parent a01cb764bd
commit bb16b12f0e

View File

@@ -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;
};