This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Fix safe iterator inconsistent assertion
- From: Jonathan Wakely <jwakely at redhat dot com>
- To: François Dumont <frs dot dumont at gmail dot com>
- Cc: "libstdc++ at gcc dot gnu dot org" <libstdc++ at gcc dot gnu dot org>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 21 Jun 2018 10:27:24 +0100
- Subject: Re: Fix safe iterator inconsistent assertion
- References: <7b34a128-b536-9686-e6eb-7b5b84b8025d@gmail.com>
On 21/06/18 07:36 +0200, François Dumont wrote:
Working on iterator == operator I noticed that a comparison in
_Safe_iterator was inconsistent.
* include/debug/debug.h
Wrong filename in the ChangeLog here.
(_Safe_iterator<>(const _Safe_iterator<_MutableIterator,>& __x)):
Compare __x base iterator with a default initialized iterator of the
same type.
Please say value-initialized not default initialized (that's what
you're actually doing, and [forward.iterators] p2 only makes it
well-defined for value-initialized iterators).
OK with those changes to the ChangeLog, thanks.