This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [PATCH] Doxygen documentation for slist
- From: Lorenz Minder <lorenz at lmapc65 dot epfl dot ch>
- To: libstdc++ at gcc dot gnu dot org
- Date: Thu, 27 Jan 2005 20:58:36 +0100
- Subject: Re: [PATCH] Doxygen documentation for slist
Ok, I hate to reply to myself, but I just said something really
confusing...
>> I never imagined replicating any of this information per function.
>> Once per file would be best IMO.
>
>I vote for leaving it once per function; splicing has different
>semantics, for example.
What I meant to imply was that splicing is different from insert()
followed by erase() with respect to iterators: Iterators remain valid
with splice() while an insert-erase sequence invalidates them.
Hmm, I just see I failed to mention that fact in the docs...
Maybe the "once per file" (or: "once per container") suggestion is not
so bad after all, right now I can't think of any way to invalidate
iterators in an slist, except (obviously) by erasing the element they
point to. You can even sort a list, and iterators will remain valid.
Opinions?
Yours,
--Lorenz