This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]