This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: bug in library standard 23.2.1.3/4
- From: "AlisdairM" <alisdair dot meredith at uk dot renaultf1 dot com>
- To: libstdc++ at gcc dot gnu dot org
- Date: Thu, 15 Feb 2007 22:25:09 +0000 (UTC)
- Subject: Re: bug in library standard 23.2.1.3/4
- References: <160658.55466.qm@web51513.mail.yahoo.com>
Steve LoBasso wrote:
> The problem is the standard doesn't say that end() will become
> invalid. This is probably why the debug implementation doesn't catch
> the problem [ie. compiling with -D_GLIBCXX_DEBUG].
<delurk>
If I understand correctly, the standard says very little about end
iterators, wrt invalidation. THe weasel-wording is that most of the
wording describing when an iterator is invalidated talk about iterators
in the sequence, or similar, but end iterators are
one-past-the-end-of-the-sequence, but not actually in the sequence, and
so are not covered.
An implementation is usually free to invalidate an end iterator as it
feels, including never if it so chooses.
<relurk>
--
AlisdairM