This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
PATCH to libstdc++/std/bastring.h to add support for push_back
- To: egcs-patches at gcc dot gnu dot org
- Subject: PATCH to libstdc++/std/bastring.h to add support for push_back
- From: Gabriel Dos Reis <Gabriel dot Dos-Reis at cmla dot ens-cachan dot fr>
- Date: 09 Mar 2000 20:03:36 +0100
- Organization: CMLA, ENS Cachan -- CNRS UMR 8536 (France)
The following patchlet add support for the string::push_back()
member-function. I would recommend to apply it to mainline as
well as to branch.
-- Gaby
2000-03-09 Gabriel Dos Reis <dosreis@dptmaths.ens-cachan.fr>
* std/bastring.h (basic_string::push_back): New member function.
Index: std/bastring.h
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++/std/bastring.h,v
retrieving revision 1.21
diff -p -r1.21 bastring.h
*** bastring.h 1999/12/15 07:43:22 1.21
--- bastring.h 2000/03/09 18:53:57
*************** public:
*** 213,218 ****
--- 213,222 ----
#endif
{ return replace (iend (), iend (), first, last); }
+ void
+ push_back(charT __c)
+ { replace(iend(), iend(), 1, __c); }
+
basic_string& assign (const basic_string& str, size_type pos = 0,
size_type n = npos)
{ return replace (0, npos, str, pos, n); }