[Patch, v7] libstdc++/24617 (was: Re: [Patch] libstdc++/23425)
Paolo Carlini
pcarlini@suse.de
Wed Nov 2 14:24:00 GMT 2005
Howard Hinnant wrote:
> clear() is best not thought of as a special case of erase(). It is
> best thought of as a special case of a private function which I'll call:
>
> void __erase_at_end(size_type n);
>
> Erases the last n elements from the vector. This is needed in the
> following public members of vector:
>
> All forms of assign.
> All forms of erase.
> All forms of resize.
> clear.
The below implements Howard's suggestion in the v7-branch. Needless to
say, I like the idea a lot, and, assuming we agree on the
implementation, after some additional testing I'm in favor of having an
appropriate version of it also in 4.1.x (x > 0). Tested x86-linux.
Paolo.
///////////////////
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: CL_24617
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20051102/3839e2ee/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch_24617
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20051102/3839e2ee/attachment-0001.ksh>
More information about the Libstdc++
mailing list