basic_string<>::_M_mutate - patch

Nathan Myers ncm@best.com
Thu Dec 30 07:30:00 GMT 1999


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


More information about the Libstdc++ mailing list