Introduce basic_safe_range
This introduces the basic_safe_range class, which can be used to
create a basic_safe_iterator. This also changes basic_safe_iterator
in two ways.
First, it simplifies the constructor. This seemed unnecessarily
complicated to me, and keeping it this way would prevent the second
change...
... which is to add a second constructor for initializing the
one-past-the-end iterator that is stored in basic_safe_iterator.
gdb/ChangeLog
2019-12-12 Tom Tromey <tom@tromey.com>
* gdbsupport/safe-iterator.h (basic_safe_iterator): Simplify. Add
second constructor.
(basic_safe_range): New class.
Change-Id: Ib351ef6fd435129a5053c64e5561877e1459ab37