This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [PATCH] Basic_string::insert
- From: Paolo Carlini <pcarlini at unitus dot it>
- To: libstdc++ at gcc dot gnu dot org
- Cc: Paolo Carlini <pcarlini at unitus dot it>, ncm at cantrip dot org
- Date: Tue, 18 Dec 2001 21:52:45 +0100
- Subject: Re: [PATCH] Basic_string::insert
- References: <3C1FAAF5.B71A5CBC@unitus.it>
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.