This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

PATCH to libstdc++/std/bastring.h to add support for push_back



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); }






Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]