This is the mail archive of the
libstdc++@sourceware.cygnus.com
mailing list for the libstdc++ project.
Re: basic_string<>::_M_mutate
- To: Benjamin Kosnik <bkoz@cygnus.com>
- Subject: Re: basic_string<>::_M_mutate
- From: Ryszard Kabatek <rysio@rumcajs.chemie.uni-halle.de>
- Date: Tue, 13 Jul 1999 10:00:58 +0200 (CEST)
- cc: libstdc++@sourceware.cygnus.com
- Reply-To: Ryszard Kabatek <kabatek@chemie.uni-halle.de>
On Mon, 12 Jul 1999, Benjamin Kosnik wrote:
>
> This and the operator+ stuff in.
You modified my patches a bit, I think my versions was better :-)
In in my version of _M_mutate _M_state was set to 0
either automaticly by creating of new _Rep object in 'if block'
or explicit in 'else block'.
Now if a new _Rep object is created _M_state will be set to 0 again
at the end of _M_mutate - it is not necessary.
In operator+(_CharT __lhs, const basic_string<>& __rhs)
You did
__str.reserve(__len + sizeof(_CharT));
- reserve takes a number of char_type objects, not bytes, so that
__str.reserve(__len + 1);
is enough.
Ryszard Kabatek
Martin-Luther University Halle-Wittenberg, Department of Physical Chemistry
Geusaer Str. 88, 06217 Merseburg, Germany
Tel. +49 3461 46 2466 Fax. +49 3461 46 2129