Introduce basic_safe_range
authorTom Tromey <tom@tromey.com>
Sun, 3 Nov 2019 17:38:36 +0000 (10:38 -0700)
committerTom Tromey <tom@tromey.com>
Thu, 12 Dec 2019 22:50:54 +0000 (15:50 -0700)
commit13bff72615e5a93a6e5f28e83a594125e66ccced
treec909c2989bc3329a5349e165b741f4804ae72942
parentdeeafabb678e59d8585be6d765c7fbd0e7060b6c
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
gdb/ChangeLog
gdb/gdbsupport/safe-iterator.h
This page took 0.025497 seconds and 4 git commands to generate.