This is the mail archive of the
libstdc++@sourceware.cygnus.com
mailing list for the libstdc++ project.
Re: basic_string<>::_M_mutate
- To: libstdc++@sourceware.cygnus.com
- Subject: Re: basic_string<>::_M_mutate
- From: Benjamin Kosnik <bkoz@cygnus.com>
- Date: Tue, 13 Jul 1999 11:30:08 -0700 (PDT)
> 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.
..but happens anyway, and it's clearer what's going on if it's explicitly
set. Sorry, but this is not going to change.
> __str.reserve(__len + sizeof(_CharT));
>
> - reserve takes a number of char_type objects, not bytes, so that
>
> __str.reserve(__len + 1);
This, however, will.
:)
thanks,
Benjamin