This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: std::string::reserve vs std::vector::reserve
On Thursday 16 June 2005 13:21, Jonathan Wakely wrote:
>
> The standard was written explicitly so that COW strings would be
> possible (some implementors have since objected that it's worded to make
> non-ref-counted strings too difficult!)
>
> The only requirement on std::string::operator= is that capacity() should
> return "a value at least as large as size()", which libstdc++'s
> implementation does.
>
Thank you for this informative answer !
Peter Soetens
--
K.U.Leuven, Mechanical Engineering, Robotics Research Group
<http://www.orocos.org> Tel: +32 16 322772