[libstdc++] Wrap vector::push_back in DEPRECATED
Phil Edwards
phil@jaj.com
Wed Mar 6 12:09:00 GMT 2002
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)
More information about the Gcc-patches
mailing list