This is the mail archive of the libstdc++@sourceware.cygnus.com mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: basic_string<>::_M_mutate



> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]