From: Phil Edwards Date: Mon, 3 Jun 2002 05:03:50 +0000 (+0000) Subject: stl_bvector.h (swap(_Bit_reference,_Bit_reference)): Move/rename... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c619473bdfba2989022baeee835577b3501a572d;p=gcc.git stl_bvector.h (swap(_Bit_reference,_Bit_reference)): Move/rename... 2002-06-03 Phil Edwards * include/bits/stl_bvector.h (swap(_Bit_reference,_Bit_reference)): Move/rename... (vector::swap(reference,reference)): ...to this. From-SVN: r54201 --- diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 3f98c60336e..5565af1ef60 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,9 @@ +2002-06-03 Phil Edwards + + * include/bits/stl_bvector.h (swap(_Bit_reference,_Bit_reference)): + Move/rename... + (vector::swap(reference,reference)): ...to this. + 2002-06-03 Phil Edwards * docs/doxygen/TODO: Update. diff --git a/libstdc++-v3/include/bits/stl_bvector.h b/libstdc++-v3/include/bits/stl_bvector.h index e48ad7d63fd..0c78d7e4bde 100644 --- a/libstdc++-v3/include/bits/stl_bvector.h +++ b/libstdc++-v3/include/bits/stl_bvector.h @@ -91,13 +91,6 @@ public: 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 { _Bit_type * _M_p; @@ -635,6 +628,14 @@ template 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())