http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59170
Jan Kratochvil <jan.kratochvil at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |UNCONFIRMED
Resolution|INVALID |---
--- Comment #2 from Jan Kratochvil <jan.kratochvil at redhat dot com> ---
It is fixable, only for development builds but that does not matter much IMO.
Just one has to build the executable with -D_GLIBCXX_DEBUG.
The test whether it is an end() iterator can be done by:
(gdb) whatis end
type = std::__debug::vector<int, std::allocator<int> >::iterator
s/::iterator$//
(gdb) p end._M_current._M_current == ((std::__debug::vector<int,
std::allocator<int> > *)end._M_sequence)._M_impl._M_finish
$29 = true
That is with -D_GLIBCXX_DEBUG each iterator contains:
/** The sequence this iterator references; may be NULL to indicate
a singular iterator. */
_Safe_sequence_base* _M_sequence;