[PATCH] Doxygen documentation for slist

Lorenz Minder lorenz@lmapc65.epfl.ch
Thu Jan 27 19:58:00 GMT 2005


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



More information about the Libstdc++ mailing list