[Patch] libstdc++/20787 (DR 130)

Paolo Carlini pcarlini@suse.de
Fri Sep 2 14:40:00 GMT 2005


Hi Peter,

>Doesn't the function return an exact copy of 'last' independent of erasing the 
>other elements? At least the tree erase seems to do just that.
>If that is the case maybe it would be better to remove the 'prior to..' part, 
>possibly replacing the whole comment with
>'A copy of last' or the like.
>  
>
Essentially, I think you are right. In fact, I had something *very
similar* to what you are suggesting in a preliminary version of the
patch. Then, I changed it for consistency with the other containers
(have a look to std::list, for example). The latter wording, in turn, is
directly inspired from 23.1.1/8.

Now, reconsidering all the issue, the associative containers are special
because an erase invalidates only the iterators referencing the erased
elements, therefore, makes perfect sense to have the simpler, less
confusing, wording for those (also in DR 130, by the way).

In short, will do the change! ;)

Thanks for your feedback!
Paolo.



More information about the Libstdc++ mailing list