[PATCH] Basic_string::insert

Paolo Carlini pcarlini@unitus.it
Tue Dec 18 12:53:00 GMT 2001


Sorry,

there is a small error in the tentative Changelog: insert(__pos, __s) already calls
insert(__pos, __s, __n) and its behaviour is affected indirectly.

Cheers,
Paolo.

/////////////

2001-12-18  Paolo Carlini  <pcarlini@unitus.it>
            Nathan Myers  <ncm@cantrip.org>

        * include/bits/basic_string.h (insert(__pos, __s, __n)):
        Optimize by avoiding temporaries and working "in-place" when possible.
        (insert(__pos1, __str)): Call insert(__pos1, __str, __pos2, __n).
        (insert(__pos1, __str, __pos2, __n)): Call insert(__pos, __s, __n).
        * testsuite/21_strings/insert.cc (test02): New testcases.






More information about the Libstdc++ mailing list