debug shrink_to_fit

Paolo Carlini paolo.carlini@oracle.com
Sun Jun 12 15:51:00 GMT 2011


... the below is what I tested and I'm committing. Note that 
__shrink_to_fit_aux is actually not so simple: being the request non 
binding, we don't want to do anything if the type isn't copy 
constructible and the move constructor can throw, whereas, per se, 
move_if_noexcept would just move in that case. Also, I decided to open 
code the vector<bool> case, otherwise the generic code for vector would 
have copied bit-by-bit, horrible performance-wise.

Tested x86_64-linux.

Thanks,
Paolo.

////////////////////
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: CL_shrink_to_fit_debug
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20110612/46258dd9/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch_shrink_to_fit_debug
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20110612/46258dd9/attachment-0001.ksh>


More information about the Libstdc++ mailing list