Speeding up v3 basic_string

Nathan Myers ncm-nospam@cantrip.org
Wed Dec 12 12:11:00 GMT 2001


On Wed, Dec 12, 2001 at 05:23:32PM +0100, Paolo Carlini wrote:
> ... a few basic_string member functions which have const char* as the
> source of the copy. In such cases, I believe, _M_replace_safe could be
> safely used, with minor modifications, more or less as happens for the
> various append.

If the pointer (or the low one) doesn't point into _Rep, 
or _Rep->is_shared(), it should be safe.

Nathan Myers
ncm at cantrip dot org



More information about the Libstdc++ mailing list