PATCH to libstdc++/std/bastring.h to add support for push_back
Gabriel Dos Reis
Gabriel.Dos-Reis@cmla.ens-cachan.fr
Thu Mar 9 11:02:00 GMT 2000
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); }
More information about the Gcc-patches
mailing list