From -5076309053186198169
X-Google-Thread: f78e5,a5065ede37bcf8d6
X-Google-Attributes: gidf78e5,public
X-Google-Language: ENGLISH,ASCII
Path: g2news1.google.com!news3.google.com!newshub.sdsu.edu!cyclone.bc.net!news.alt.net!comp-std-cpp-robomod!not-for-mail
From: "kanze" <kanze@gabi-soft.fr>
Newsgroups: comp.std.c++
Subject: =?iso-8859-1?q?Re:_Problems_interpreting_requirement_for_std::copy_(=A725.2.1)?=
Date: 14 Sep 2005 14:40:24 GMT
Organization: http://groups.google.com
Lines: 47
Approved: Fergus Henderson <fjh@cs.mu.oz.au>, moderator of comp.std.c++
Message-ID: <1126690042.222765.230600@f14g2000cwb.googlegroups.com>
References: <1126258566.887901.223500@g43g2000cwa.googlegroups.com>
   <3qlVe.538$pq6.9733@twister2.libero.it>
   <m13bo9zgpc.fsf@uniton.integrable-solutions.net>
   <lQxVe.1265$m56.36814@twister1.libero.it>
Mime-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: 8bit
Return-Path: <devnull@stump.algebra.com>
X-Authentication-Warning: mulga.cs.mu.OZ.AU: fjh set sender to devnull@stump.algebra.com using -f
X-Robomod: STUMP, ichudov@algebra.com (Igor Chudov)
Delivered-To: std-c++@ucar.edu
X-Trace: posting.google.com 1126690047 28370 127.0.0.1 (14 Sep 2005 09:27:27 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Wed, 14 Sep 2005 09:27:27 +0000 (UTC)
User-Agent: G2/0.2
X-HTTP-UserAgent: Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.0.1) Gecko/20020920 Netscape/7.0,gzip(gfe),gzip(gfe)
Complaints-To: groups-abuse@google.com
Injection-Info: f14g2000cwb.googlegroups.com; posting-host=62.160.54.162;
   posting-account=qsfl8gwAAABZGaLp2a7FeTfDkJamzWYW
X-Greylisting: NO DELAY (Relay+Sender autoqualified);
	processed by UCSD_GL-v2.1 on mailbox4.ucsd.edu;
	Wed, 14 September 2005 02:27:28 -0700 (PDT)
X-Spamscanner: mailbox4.ucsd.edu  (v1.6 Aug  4 2005 15:27:38, -2.8/5.0 3.0.4)
X-MailScanner: PASSED (v1.2.8 21919 j8E9RRtc030630 mailbox4.ucsd.edu)
X-Virus-Scanned: amavisd-new at ucar.edu
X-MIME-Autoconverted: from quoted-printable to 8bit by mailman.ucar.edu id j8E9RlNC031999
X-Virus-Scanned: amavisd-new at cs.mu.OZ.AU
X-Virus-Scanned: amavisd-new at cs.mu.OZ.AU
Xref: g2news1.google.com comp.std.c++:2113

Alberto Ganesh Barbati wrote:
> Gabriel Dos Reis wrote:

    [...]
> > Consider this:

> >     p = l.end();
> >     l.push_back(8);
> >     q = l.end();
> >     assert (p == q);

> That might happen for some (probably most) implementations of
> std::list, but I could find no statement in the standard that
> provides such guarantee. If you think such guarantee is
> provided, I will be glad to have a precise reference in the
> standard. Without an explicit or implicit guarantee you cannot
> assume that the expression in the assert always true for all
> conformant implementations of std::list.

�23.2.23/1, in the decription of insert, push_front and
push_back: "Does not affect the validity of iterators and
references."

I don't find an exact definition in the standard as to what it
means by validity, but from the actual use, I think it means
that the iterator continues to designate the same element (or in
the case of end(), it continues to designate an element one past
the end).

Note that this guarantee only applies to std::list.  The other
containers offer differents sets of guarantees, and none of the
other containers guarantee the validity of an end iterator after
an insertion.

--
James Kanze                                           GABI Software
Conseils en informatique orient�e objet/
                   Beratung in objektorientierter Datenverarbeitung
9 place S�mard, 78210 St.-Cyr-l'�cole, France, +33 (0)1 30 23 00 34


---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.jamesd.demon.co.uk/csc/faq.html                       ]



