This is the mail archive of the
libstdc++@sourceware.cygnus.com
mailing list for the libstdc++ project.
basic_string<>::_M_mutate - patch
- To: libstdc++@sourceware.cygnus.com
- Subject: basic_string<>::_M_mutate - patch
- From: Nathan Myers <ncm@best.com>
- Date: Tue, 29 Jun 1999 01:57:56 -0700 (PDT)
- Reply-To: ncm@cantrip.org
One other thing... my suggestion isn't just a matter
of prettying up the code. clone() is obliged to copy
all the characters. Imagine a case of a string with
size() == 1000000, and called with _M_mutate(2,999996,999996).
Then, clone() must copy a million characters, but _M_mutate
need copy only four.
Nathan