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]
Other format: [Raw text]

[libstdc++] Wrap vector::push_back in DEPRECATED


As discussed on the v3 list; oddball additions from the HP/SGI code should
be guarded.  Tested on i686-linux, no regressions.


2002-03-06  Phil Edwards  <pme@gcc.gnu.org>

	PR libstdc++/5734
	* include/bits/stl_vector.h (vector::push_back()):  Guard with
	_GLIBCPP_DEPRECATED.


Index: include/bits/stl_vector.h
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/include/bits/stl_vector.h,v
retrieving revision 1.17
diff -u -3 -p -r1.17 stl_vector.h
--- stl_vector.h	2002/02/08 02:19:06	1.17
+++ stl_vector.h	2002/03/06 20:07:11
@@ -484,9 +484,13 @@ public:
       _M_insert_aux(end(), __x);
   }
 
+#ifdef _GLIBCPP_DEPRECATED
   /**
    *  Add an element to the end of the vector.  The element is
    *  default-constructed.
+   *
+   *  @note You must define _GLIBCPP_DEPRECATED to make this visible; see
+   *        c++config.h.
   */
   void
   push_back()
@@ -498,6 +502,7 @@ public:
     else
       _M_insert_aux(end());
   }
+#endif
 
   void
   swap(vector<_Tp, _Alloc>& __x)


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