OSDN Git Service

2002-06-03 Phil Edwards <pme@gcc.gnu.org>
authorpme <pme@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 3 Jun 2002 05:03:50 +0000 (05:03 +0000)
committerpme <pme@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 3 Jun 2002 05:03:50 +0000 (05:03 +0000)
* include/bits/stl_bvector.h (swap(_Bit_reference,_Bit_reference)):
Move/rename...
(vector<bool>::swap(reference,reference)): ...to this.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@54201 138bc75d-0d04-0410-961f-82ee72b054a4

libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/stl_bvector.h

index 3f98c60..5565af1 100644 (file)
@@ -1,5 +1,11 @@
 2002-06-03  Phil Edwards  <pme@gcc.gnu.org>
 
 2002-06-03  Phil Edwards  <pme@gcc.gnu.org>
 
+       * include/bits/stl_bvector.h (swap(_Bit_reference,_Bit_reference)):
+       Move/rename...
+       (vector<bool>::swap(reference,reference)): ...to this.
+
+2002-06-03  Phil Edwards  <pme@gcc.gnu.org>
+
        * docs/doxygen/TODO:  Update.
        * docs/doxygen/user.cfg.in (SORT_MEMBER_DOCS):  Set to off, now that
        some class members are in 14882 order.
        * docs/doxygen/TODO:  Update.
        * docs/doxygen/user.cfg.in (SORT_MEMBER_DOCS):  Set to off, now that
        some class members are in 14882 order.
index e48ad7d..0c78d7e 100644 (file)
@@ -91,13 +91,6 @@ public:
   void flip() { *_M_p ^= _M_mask; }
 };
 
   void flip() { *_M_p ^= _M_mask; }
 };
 
-inline void swap(_Bit_reference __x, _Bit_reference __y)
-{
-  bool __tmp = __x;
-  __x = __y;
-  __y = __tmp;
-}
-
 struct _Bit_iterator_base : public iterator<random_access_iterator_tag, bool>
 {
   _Bit_type * _M_p;
 struct _Bit_iterator_base : public iterator<random_access_iterator_tag, bool>
 {
   _Bit_type * _M_p;
@@ -635,6 +628,14 @@ template <typename _Alloc>
       std::swap(_M_finish, __x._M_finish);
       std::swap(_M_end_of_storage, __x._M_end_of_storage);
     }
       std::swap(_M_finish, __x._M_finish);
       std::swap(_M_end_of_storage, __x._M_end_of_storage);
     }
+
+    // [23.2.5]/1, third-to-last entry in synopsis listing
+    static void swap(reference __x, reference __y) {
+      bool __tmp = __x;
+      __x = __y;
+      __y = __tmp;
+    }
+
     iterator insert(iterator __position, bool __x = bool()) {
       difference_type __n = __position - begin();
       if (_M_finish._M_p != _M_end_of_storage && __position == end())
     iterator insert(iterator __position, bool __x = bool()) {
       difference_type __n = __position - begin();
       if (_M_finish._M_p != _M_end_of_storage && __position == end())