]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
stl_pair.h (swap): Do not swap rvalues.
authorJonathan Wakely <jwakely.gcc@gmail.com>
Mon, 18 May 2009 22:15:56 +0000 (22:15 +0000)
committerJonathan Wakely <redi@gcc.gnu.org>
Mon, 18 May 2009 22:15:56 +0000 (23:15 +0100)
2009-05-18  Jonathan Wakely  <jwakely.gcc@gmail.com>

* include/bits/stl_pair.h (swap): Do not swap rvalues.
* include/bits/stl_deque.h (swap): Likewise.
* include/bits/stl_list.h (swap): Likewise.
* include/bits/stl_vector.h (swap): Likewise.
* include/bits/stl_bvector.h (swap): Likewise.
* include/bits/stl_queue.h (swap): Likewise.
* include/bits/stl_stack.h (swap): Likewise.
* include/bits/stl_tree.h (swap): Likewise.
* include/bits/stl_map.h (swap): Likewise.
* include/bits/stl_multimap.h (swap): Likewise.
* include/bits/stl_set.h (swap): Likewise.
* include/bits/stl_multiset.h (swap): Likewise.
* include/bits/forward_list.h (swap): Likewise.
* include/bits/unique_ptr.h (swap): Likewise.
* include/debug/deque (swap): Likewise.
* include/debug/list (swap): Likewise.
* include/debug/vector (swap): Likewise.
* include/debug/map.h (swap): Likewise.
* include/debug/multimap.h (swap): Likewise.
* include/debug/set.h (swap): Likewise.
* include/debug/multiset.h (swap): Likewise.
* include/debug/unordered_map (swap): Likewise.
* include/debug/unordered_set (swap): Likewise.
* include/ext/vstring.h (swap): Likewise.
* include/tr1_impl/unordered_map (swap): Likewise.
* include/tr1_impl/hashtable (swap): Likewise.
* include/tr1_impl/unordered_set (swap): Likewise.
* include/std/tuple (swap): Likewise.
* include/std/mutex (swap): Likewise.
* include/std/thread (swap): Likewise.
(operator<<): Only output to lvalue streams.
* testsuite/20_util/shared_ptr/modifiers/swap_rvalue.cc: Remove.
* testsuite/23_containers/headers/forward_list/synopsis.cc: Adjust.
* testsuite/23_containers/deque/requirements/dr438/
assign_neg.cc: Adjust line numbers.
* testsuite/23_containers/deque/requirements/dr438/
constructor_1_neg.cc: Likewise.
* testsuite/23_containers/deque/requirements/dr438/
constructor_2_neg.cc: Likewise.
* testsuite/23_containers/deque/requirements/dr438/
insert_neg.cc: Likewise.
* testsuite/23_containers/list/requirements/dr438/
assign_neg.cc: Likewise.
* testsuite/23_containers/list/requirements/dr438/
constructor_1_neg.cc: Likewise.
* testsuite/23_containers/list/requirements/dr438/
constructor_2_neg.cc: Likewise.
* testsuite/23_containers/list/requirements/dr438/
insert_neg.cc: Likewise.
* testsuite/23_containers/vector/requirements/dr438/
assign_neg.cc: Likewise.
* testsuite/23_containers/vector/requirements/dr438/
constructor_1_neg.cc: Likewise.
* testsuite/23_containers/vector/requirements/dr438/
constructor_2_neg.cc: Likewise.
* testsuite/23_containers/vector/requirements/dr438/
insert_neg.cc: Likewise.
* testsuite/30_threads/thread/swap/1.cc: Swap with lvalue and also
test non-member swap.
* testsuite/30_threads/thread/swap/2.cc: Remove.

From-SVN: r147678

47 files changed:
libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/forward_list.h
libstdc++-v3/include/bits/stl_bvector.h
libstdc++-v3/include/bits/stl_deque.h
libstdc++-v3/include/bits/stl_list.h
libstdc++-v3/include/bits/stl_map.h
libstdc++-v3/include/bits/stl_multimap.h
libstdc++-v3/include/bits/stl_multiset.h
libstdc++-v3/include/bits/stl_pair.h
libstdc++-v3/include/bits/stl_queue.h
libstdc++-v3/include/bits/stl_set.h
libstdc++-v3/include/bits/stl_stack.h
libstdc++-v3/include/bits/stl_tree.h
libstdc++-v3/include/bits/stl_vector.h
libstdc++-v3/include/bits/unique_ptr.h
libstdc++-v3/include/debug/deque
libstdc++-v3/include/debug/list
libstdc++-v3/include/debug/map.h
libstdc++-v3/include/debug/multimap.h
libstdc++-v3/include/debug/multiset.h
libstdc++-v3/include/debug/set.h
libstdc++-v3/include/debug/unordered_map
libstdc++-v3/include/debug/unordered_set
libstdc++-v3/include/debug/vector
libstdc++-v3/include/ext/vstring.h
libstdc++-v3/include/std/mutex
libstdc++-v3/include/std/thread
libstdc++-v3/include/std/tuple
libstdc++-v3/include/tr1_impl/hashtable
libstdc++-v3/include/tr1_impl/unordered_map
libstdc++-v3/include/tr1_impl/unordered_set
libstdc++-v3/testsuite/20_util/shared_ptr/modifiers/swap_rvalue.cc [deleted file]
libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/assign_neg.cc
libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/constructor_1_neg.cc
libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/constructor_2_neg.cc
libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/insert_neg.cc
libstdc++-v3/testsuite/23_containers/headers/forward_list/synopsis.cc
libstdc++-v3/testsuite/23_containers/list/requirements/dr438/assign_neg.cc
libstdc++-v3/testsuite/23_containers/list/requirements/dr438/constructor_1_neg.cc
libstdc++-v3/testsuite/23_containers/list/requirements/dr438/constructor_2_neg.cc
libstdc++-v3/testsuite/23_containers/list/requirements/dr438/insert_neg.cc
libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/assign_neg.cc
libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/constructor_1_neg.cc
libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/constructor_2_neg.cc
libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/insert_neg.cc
libstdc++-v3/testsuite/30_threads/thread/swap/1.cc
libstdc++-v3/testsuite/30_threads/thread/swap/2.cc [deleted file]

index ea4b25603592d1f80d571377e461ca002c6bf8c6..29c480526f1dbec1acfc9a1059fb2f1927ba0324 100644 (file)
@@ -1,4 +1,67 @@
-2009-05-13  Jonathan Wakely  <jwakely.gcc@gmail.com>
+2009-05-18  Jonathan Wakely  <jwakely.gcc@gmail.com>
+
+       * include/bits/stl_pair.h (swap): Do not swap rvalues.
+       * include/bits/stl_deque.h (swap): Likewise.
+       * include/bits/stl_list.h (swap): Likewise.
+       * include/bits/stl_vector.h (swap): Likewise.
+       * include/bits/stl_bvector.h (swap): Likewise.
+       * include/bits/stl_queue.h (swap): Likewise.
+       * include/bits/stl_stack.h (swap): Likewise.
+       * include/bits/stl_tree.h (swap): Likewise.
+       * include/bits/stl_map.h (swap): Likewise.
+       * include/bits/stl_multimap.h (swap): Likewise.
+       * include/bits/stl_set.h (swap): Likewise.
+       * include/bits/stl_multiset.h (swap): Likewise.
+       * include/bits/forward_list.h (swap): Likewise.
+       * include/bits/unique_ptr.h (swap): Likewise.
+       * include/debug/deque (swap): Likewise.
+       * include/debug/list (swap): Likewise.
+       * include/debug/vector (swap): Likewise.
+       * include/debug/map.h (swap): Likewise.
+       * include/debug/multimap.h (swap): Likewise.
+       * include/debug/set.h (swap): Likewise.
+       * include/debug/multiset.h (swap): Likewise.
+       * include/debug/unordered_map (swap): Likewise.
+       * include/debug/unordered_set (swap): Likewise.
+       * include/ext/vstring.h (swap): Likewise.
+       * include/tr1_impl/unordered_map (swap): Likewise.
+       * include/tr1_impl/hashtable (swap): Likewise.
+       * include/tr1_impl/unordered_set (swap): Likewise.
+       * include/std/tuple (swap): Likewise.
+       * include/std/mutex (swap): Likewise.
+       * include/std/thread (swap): Likewise.
+       (operator<<): Only output to lvalue streams.
+       * testsuite/20_util/shared_ptr/modifiers/swap_rvalue.cc: Remove.
+       * testsuite/23_containers/headers/forward_list/synopsis.cc: Adjust.
+       * testsuite/23_containers/deque/requirements/dr438/
+       assign_neg.cc: Adjust line numbers.
+       * testsuite/23_containers/deque/requirements/dr438/
+       constructor_1_neg.cc: Likewise.
+       * testsuite/23_containers/deque/requirements/dr438/
+       constructor_2_neg.cc: Likewise.
+       * testsuite/23_containers/deque/requirements/dr438/
+       insert_neg.cc: Likewise.
+       * testsuite/23_containers/list/requirements/dr438/
+       assign_neg.cc: Likewise.
+       * testsuite/23_containers/list/requirements/dr438/
+       constructor_1_neg.cc: Likewise.
+       * testsuite/23_containers/list/requirements/dr438/
+       constructor_2_neg.cc: Likewise.
+       * testsuite/23_containers/list/requirements/dr438/
+       insert_neg.cc: Likewise.
+       * testsuite/23_containers/vector/requirements/dr438/
+       assign_neg.cc: Likewise.
+       * testsuite/23_containers/vector/requirements/dr438/
+       constructor_1_neg.cc: Likewise.
+       * testsuite/23_containers/vector/requirements/dr438/
+       constructor_2_neg.cc: Likewise.
+       * testsuite/23_containers/vector/requirements/dr438/
+       insert_neg.cc: Likewise.
+       * testsuite/30_threads/thread/swap/1.cc: Swap with lvalue and also
+       test non-member swap.
+       * testsuite/30_threads/thread/swap/2.cc: Remove.
+
+2009-05-16  Jonathan Wakely  <jwakely.gcc@gmail.com>
 
        * include/std/mutex: Move std::lock_error to ...
        * src/compatibility.cc: Here.
index d49eb4a0678d0ada730c5fd3d7ef2c9ada053d4e..724d87b01b1a30729d9c62a21092008341e9d276 100644 (file)
@@ -983,7 +983,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
        *  function.
        */
       void
-      swap(forward_list&& __list)
+      swap(forward_list& __list)
       { _Node_base::swap(this->_M_impl._M_head, __list._M_impl._M_head); }
 
       /**
@@ -1285,20 +1285,6 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
          forward_list<_Tp, _Alloc>& __ly)
     { __lx.swap(__ly); }
 
-  /// See std::forward_list::swap().
-  template<typename _Tp, typename _Alloc>
-    inline void
-    swap(forward_list<_Tp, _Alloc>&& __lx,
-         forward_list<_Tp, _Alloc>& __ly)
-    { __lx.swap(__ly); }
-
-  /// See std::forward_list::swap().
-  template<typename _Tp, typename _Alloc>
-    inline void 
-    swap(forward_list<_Tp, _Alloc>& __lx,
-        forward_list<_Tp, _Alloc>&& __ly)
-    { __lx.swap(__ly); }
-
 _GLIBCXX_END_NAMESPACE // namespace std
 
 #endif // __GXX_EXPERIMENTAL_CXX0X__
index 0e60b7f1b927b3846ba54b7b305afcbf2660d3d4..87dbb0b3f87c955660b59249413be9c7223fbb70 100644 (file)
@@ -743,11 +743,7 @@ template<typename _Alloc>
     }
 
     void
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
-    swap(vector&& __x)
-#else
     swap(vector& __x)
-#endif
     {
       std::swap(this->_M_impl._M_start, __x._M_impl._M_start);
       std::swap(this->_M_impl._M_finish, __x._M_impl._M_finish);
index 1c20e275f758d18831a2ca2baa0d1be07fd6c6be..7f601cbf0fb0f39b9c26c96c6b13537e5c82b968 100644 (file)
@@ -1395,11 +1395,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
        *  std::swap(d1,d2) will feed to this function.
        */
       void
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
-      swap(deque&& __x)
-#else
       swap(deque& __x)
-#endif
       {
        std::swap(this->_M_impl._M_start, __x._M_impl._M_start);
        std::swap(this->_M_impl._M_finish, __x._M_impl._M_finish);
@@ -1802,18 +1798,6 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
     swap(deque<_Tp,_Alloc>& __x, deque<_Tp,_Alloc>& __y)
     { __x.swap(__y); }
 
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
-  template<typename _Tp, typename _Alloc>
-    inline void
-    swap(deque<_Tp,_Alloc>&& __x, deque<_Tp,_Alloc>& __y)
-    { __x.swap(__y); }
-
-  template<typename _Tp, typename _Alloc>
-    inline void
-    swap(deque<_Tp,_Alloc>& __x, deque<_Tp,_Alloc>&& __y)
-    { __x.swap(__y); }
-#endif
-
 _GLIBCXX_END_NESTED_NAMESPACE
 
 #endif /* _STL_DEQUE_H */
index bba1f53044e6700e60b58278362a6acae29bbfdd..f758baed5c9a50fb2ce22b1660fbd97a6c856f78 100644 (file)
@@ -1106,11 +1106,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
        *  function.
        */
       void
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
-      swap(list&& __x)
-#else
       swap(list& __x)
-#endif
       {
        _List_node_base::swap(this->_M_impl._M_node, __x._M_impl._M_node);
 
@@ -1516,18 +1512,6 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
     swap(list<_Tp, _Alloc>& __x, list<_Tp, _Alloc>& __y)
     { __x.swap(__y); }
 
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
-  template<typename _Tp, typename _Alloc>
-    inline void
-    swap(list<_Tp, _Alloc>&& __x, list<_Tp, _Alloc>& __y)
-    { __x.swap(__y); }
-
-  template<typename _Tp, typename _Alloc>
-    inline void
-    swap(list<_Tp, _Alloc>& __x, list<_Tp, _Alloc>&& __y)
-    { __x.swap(__y); }
-#endif
-
 _GLIBCXX_END_NESTED_NAMESPACE
 
 #endif /* _STL_LIST_H */
index 90e5239ddabec37c9d6b45c83fd4a1c015f83cdf..5416d82756777eb520446c9d63851f8a08f1a288 100644 (file)
@@ -608,11 +608,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
        *  that std::swap(m1,m2) will feed to this function.
        */
       void
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
-      swap(map&& __x)
-#else
       swap(map& __x)
-#endif
       { _M_t.swap(__x._M_t); }
 
       /**
@@ -852,20 +848,6 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
         map<_Key, _Tp, _Compare, _Alloc>& __y)
     { __x.swap(__y); }
 
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
-  template<typename _Key, typename _Tp, typename _Compare, typename _Alloc>
-    inline void
-    swap(map<_Key, _Tp, _Compare, _Alloc>&& __x,
-        map<_Key, _Tp, _Compare, _Alloc>& __y)
-    { __x.swap(__y); }
-
-  template<typename _Key, typename _Tp, typename _Compare, typename _Alloc>
-    inline void
-    swap(map<_Key, _Tp, _Compare, _Alloc>& __x,
-        map<_Key, _Tp, _Compare, _Alloc>&& __y)
-    { __x.swap(__y); }
-#endif
-
 _GLIBCXX_END_NESTED_NAMESPACE
 
 #endif /* _STL_MAP_H */
index 484537cf2fedc34d0a8292733654de3e3d8a3e58..91dcfa675f466fb2246eafd5e2b30063ddca323d 100644 (file)
@@ -544,11 +544,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
        *  std::swap(m1,m2) will feed to this function.
        */
       void
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
-      swap(multimap&& __x)
-#else
       swap(multimap& __x)
-#endif
       { _M_t.swap(__x._M_t); }
 
       /**
@@ -781,20 +777,6 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
          multimap<_Key, _Tp, _Compare, _Alloc>& __y)
     { __x.swap(__y); }
 
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
-  template<typename _Key, typename _Tp, typename _Compare, typename _Alloc>
-    inline void
-    swap(multimap<_Key, _Tp, _Compare, _Alloc>&& __x,
-         multimap<_Key, _Tp, _Compare, _Alloc>& __y)
-    { __x.swap(__y); }
-
-  template<typename _Key, typename _Tp, typename _Compare, typename _Alloc>
-    inline void
-    swap(multimap<_Key, _Tp, _Compare, _Alloc>& __x,
-         multimap<_Key, _Tp, _Compare, _Alloc>&& __y)
-    { __x.swap(__y); }
-#endif
-
 _GLIBCXX_END_NESTED_NAMESPACE
 
 #endif /* _STL_MULTIMAP_H */
index b5c710f31d260e5e5d40901bd88929851f06e8ae..be9e2489ce94b10c05e6e2db3a1911b2c952eb00 100644 (file)
@@ -376,11 +376,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
        *  std::swap(s1,s2) will feed to this function.
        */
       void
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
-      swap(multiset&& __x)
-#else
       swap(multiset& __x)
-#endif
       { _M_t.swap(__x._M_t); }
 
       // insert/erase
@@ -678,20 +674,6 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
         multiset<_Key, _Compare, _Alloc>& __y)
     { __x.swap(__y); }
 
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
-  template<typename _Key, typename _Compare, typename _Alloc>
-    inline void
-    swap(multiset<_Key, _Compare, _Alloc>&& __x,
-        multiset<_Key, _Compare, _Alloc>& __y)
-    { __x.swap(__y); }
-
-  template<typename _Key, typename _Compare, typename _Alloc>
-    inline void
-    swap(multiset<_Key, _Compare, _Alloc>& __x,
-        multiset<_Key, _Compare, _Alloc>&& __y)
-    { __x.swap(__y); }
-#endif
-
 _GLIBCXX_END_NESTED_NAMESPACE
 
 #endif /* _STL_MULTISET_H */
index fd395adbd0b3e1f321921df341bfd37d2d1a9ea5..d6c590186d65da66105e7f3e0ba7c4a55cf10deb 100644 (file)
@@ -131,7 +131,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
        }
 
       void
-      swap(pair&& __p)
+      swap(pair& __p)
       {
        using std::swap;
        swap(first, __p.first);
@@ -185,16 +185,6 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
     inline void
     swap(pair<_T1, _T2>& __x, pair<_T1, _T2>& __y)
     { __x.swap(__y); }
-
-  template<class _T1, class _T2>
-    inline void
-    swap(pair<_T1, _T2>&& __x, pair<_T1, _T2>& __y)
-    { __x.swap(__y); }
-
-  template<class _T1, class _T2>
-    inline void
-    swap(pair<_T1, _T2>& __x, pair<_T1, _T2>&& __y)
-    { __x.swap(__y); }
 #endif
 
   /**
index 7479469d15a339b1ecc74ef5681278ad1ea4d067..61149c457089be8b55816dd07932932d736b4c54 100644 (file)
@@ -249,7 +249,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
 
 #ifdef __GXX_EXPERIMENTAL_CXX0X__
       void
-      swap(queue&& __q)
+      swap(queue& __q)
       { c.swap(__q.c); }
 #endif
     };
@@ -317,16 +317,6 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
     inline void
     swap(queue<_Tp, _Seq>& __x, queue<_Tp, _Seq>& __y)
     { __x.swap(__y); }
-
-  template<typename _Tp, typename _Seq>
-    inline void
-    swap(queue<_Tp, _Seq>&& __x, queue<_Tp, _Seq>& __y)
-    { __x.swap(__y); }
-
-  template<typename _Tp, typename _Seq>
-    inline void
-    swap(queue<_Tp, _Seq>& __x, queue<_Tp, _Seq>&& __y)
-    { __x.swap(__y); }
 #endif
 
   /**
@@ -550,7 +540,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
 
 #ifdef __GXX_EXPERIMENTAL_CXX0X__
       void
-      swap(priority_queue&& __pq)
+      swap(priority_queue& __pq)
       {
        using std::swap;
        c.swap(__pq.c);
@@ -567,18 +557,6 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
     swap(priority_queue<_Tp, _Sequence, _Compare>& __x,
         priority_queue<_Tp, _Sequence, _Compare>& __y)
     { __x.swap(__y); }
-
-  template<typename _Tp, typename _Sequence, typename _Compare>
-    inline void
-    swap(priority_queue<_Tp, _Sequence, _Compare>&& __x,
-        priority_queue<_Tp, _Sequence, _Compare>& __y)
-    { __x.swap(__y); }
-
-  template<typename _Tp, typename _Sequence, typename _Compare>
-    inline void
-    swap(priority_queue<_Tp, _Sequence, _Compare>& __x,
-        priority_queue<_Tp, _Sequence, _Compare>&& __y)
-    { __x.swap(__y); }
 #endif
 
 _GLIBCXX_END_NAMESPACE
index f06fe033642beb3c5875fc4b935786cf9a3811cd..ccd0bc7b2ff8286076e351adf0340a26079f8f24 100644 (file)
@@ -383,11 +383,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
        *  std::swap(s1,s2) will feed to this function.
        */
       void
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
-      swap(set&& __x)
-#else
       swap(set& __x)   
-#endif
       { _M_t.swap(__x._M_t); }
 
       // insert/erase
@@ -691,18 +687,6 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
     swap(set<_Key, _Compare, _Alloc>& __x, set<_Key, _Compare, _Alloc>& __y)
     { __x.swap(__y); }
 
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
-  template<typename _Key, typename _Compare, typename _Alloc>
-    inline void
-    swap(set<_Key, _Compare, _Alloc>&& __x, set<_Key, _Compare, _Alloc>& __y)
-    { __x.swap(__y); }
-
-  template<typename _Key, typename _Compare, typename _Alloc>
-    inline void
-    swap(set<_Key, _Compare, _Alloc>& __x, set<_Key, _Compare, _Alloc>&& __y)
-    { __x.swap(__y); }
-#endif
-
 _GLIBCXX_END_NESTED_NAMESPACE
 
 #endif /* _STL_SET_H */
index da301d474a897ee323d4690ce8f7f41aba264873..417840872101e9940e82e7f1d18079f4ddfbba37 100644 (file)
@@ -213,7 +213,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
 
 #ifdef __GXX_EXPERIMENTAL_CXX0X__
       void
-      swap(stack&& __s)
+      swap(stack& __s)
       { c.swap(__s.c); }
 #endif
     };
@@ -282,16 +282,6 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
     inline void
     swap(stack<_Tp, _Seq>& __x, stack<_Tp, _Seq>& __y)
     { __x.swap(__y); }
-
-  template<typename _Tp, typename _Seq>
-    inline void
-    swap(stack<_Tp, _Seq>&& __x, stack<_Tp, _Seq>& __y)
-    { __x.swap(__y); }
-
-  template<typename _Tp, typename _Seq>
-    inline void
-    swap(stack<_Tp, _Seq>& __x, stack<_Tp, _Seq>&& __y)
-    { __x.swap(__y); }
 #endif
 
 _GLIBCXX_END_NAMESPACE
index ecf3b5c3fe4a37aa409e28b2967b1ec2835cb5fb..1a67b563f62a5d569763ef8360346c2399441cce 100644 (file)
@@ -675,11 +675,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
       { return _M_get_Node_allocator().max_size(); }
 
       void
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
-      swap(_Rb_tree&& __t);
-#else
       swap(_Rb_tree& __t);      
-#endif
 
       // Insert/erase.
       pair<iterator, bool>
@@ -1104,11 +1100,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
            typename _Compare, typename _Alloc>
     void
     _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
-    swap(_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>&& __t)
-#else
     swap(_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __t)
-#endif
     {
       if (_M_root() == 0)
        {
index 9af983d4346b6dc88f13cec1970657b9de14b038..a68e9560816062234b90ef9e8c7aac6301de3853 100644 (file)
@@ -923,11 +923,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
        *  std::swap(v1,v2) will feed to this function.
        */
       void
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
-      swap(vector&& __x)
-#else
       swap(vector& __x)
-#endif
       {
        std::swap(this->_M_impl._M_start, __x._M_impl._M_start);
        std::swap(this->_M_impl._M_finish, __x._M_impl._M_finish);
@@ -1216,18 +1212,6 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
     swap(vector<_Tp, _Alloc>& __x, vector<_Tp, _Alloc>& __y)
     { __x.swap(__y); }
 
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
-  template<typename _Tp, typename _Alloc>
-    inline void
-    swap(vector<_Tp, _Alloc>&& __x, vector<_Tp, _Alloc>& __y)
-    { __x.swap(__y); }
-
-  template<typename _Tp, typename _Alloc>
-    inline void
-    swap(vector<_Tp, _Alloc>& __x, vector<_Tp, _Alloc>&& __y)
-    { __x.swap(__y); }
-#endif
-
 _GLIBCXX_END_NESTED_NAMESPACE
 
 #endif /* _STL_VECTOR_H */
index b686d11fd8026a995f6c17eca76a4a5728d4e386..c1185f242d704949711b17faade40d8b78da9099 100644 (file)
@@ -204,7 +204,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
       }
 
       void
-      swap(unique_ptr&& __u)
+      swap(unique_ptr& __u)
       {
        using std::swap;
        swap(_M_t, __u._M_t);
@@ -350,7 +350,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
         void reset(_Up) = delete;
 
       void
-      swap(unique_ptr&& __u)
+      swap(unique_ptr& __u)
       {
        using std::swap;
        swap(_M_t, __u._M_t);
@@ -389,18 +389,6 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
         unique_ptr<_Tp, _Tp_Deleter>& __y)
     { __x.swap(__y); }
 
-  template<typename _Tp, typename _Tp_Deleter> 
-    inline void
-    swap(unique_ptr<_Tp, _Tp_Deleter>&& __x,
-        unique_ptr<_Tp, _Tp_Deleter>& __y)
-    { __x.swap(__y); }
-
-  template<typename _Tp, typename _Tp_Deleter> 
-    inline void
-    swap(unique_ptr<_Tp, _Tp_Deleter>& __x,
-        unique_ptr<_Tp, _Tp_Deleter>&& __y)
-    { __x.swap(__y); }
-  
   template<typename _Tp, typename _Tp_Deleter,
           typename _Up, typename _Up_Deleter>
     inline bool
index b481fd14bb480fe2d9bf51fb65883d932c7e29b9..3a39dc46004f7526486c4d41ec6668b6b9dde910 100644 (file)
@@ -432,11 +432,7 @@ namespace __debug
       }
 
       void
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
-      swap(deque&& __x)
-#else
       swap(deque& __x)
-#endif
       {
        _Base::swap(__x);
        this->_M_swap(__x);
@@ -497,18 +493,6 @@ namespace __debug
     swap(deque<_Tp, _Alloc>& __lhs, deque<_Tp, _Alloc>& __rhs)
     { __lhs.swap(__rhs); }
 
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
-  template<typename _Tp, typename _Alloc>
-    inline void
-    swap(deque<_Tp, _Alloc>&& __lhs, deque<_Tp, _Alloc>& __rhs)
-    { __lhs.swap(__rhs); }
-
-  template<typename _Tp, typename _Alloc>
-    inline void
-    swap(deque<_Tp, _Alloc>& __lhs, deque<_Tp, _Alloc>&& __rhs)
-    { __lhs.swap(__rhs); }
-#endif
-
 } // namespace __debug
 } // namespace std
 
index 39f763a33d1a4879882a9cf83dbf14ad186d6506..d4904893f22c6f2d5fc9fbb25eb2512dc9c2c22d 100644 (file)
@@ -367,11 +367,7 @@ namespace __debug
       }
 
       void
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
-      swap(list&& __x)
-#else
       swap(list& __x)
-#endif
       {
        _Base::swap(__x);
        this->_M_swap(__x);
@@ -635,18 +631,6 @@ namespace __debug
     swap(list<_Tp, _Alloc>& __lhs, list<_Tp, _Alloc>& __rhs)
     { __lhs.swap(__rhs); }
 
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
-  template<typename _Tp, typename _Alloc>
-    inline void
-    swap(list<_Tp, _Alloc>&& __lhs, list<_Tp, _Alloc>& __rhs)
-    { __lhs.swap(__rhs); }
-
-  template<typename _Tp, typename _Alloc>
-    inline void
-    swap(list<_Tp, _Alloc>& __lhs, list<_Tp, _Alloc>&& __rhs)
-    { __lhs.swap(__rhs); }
-#endif
-
 } // namespace __debug
 } // namespace std
 
index de1e5a5e324471bc14c7e5dc2479f394e9a250b7..c8eec2c4c6f10761aec31fa92d6bc8c5466637bd 100644 (file)
@@ -260,11 +260,7 @@ namespace __debug
       }
 
       void
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
-      swap(map&& __x)
-#else
       swap(map& __x)
-#endif
       {
        _Base::swap(__x);
        this->_M_swap(__x);
@@ -390,22 +386,6 @@ namespace __debug
         map<_Key, _Tp, _Compare, _Allocator>& __rhs)
     { __lhs.swap(__rhs); }
 
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
-  template<typename _Key, typename _Tp,
-          typename _Compare, typename _Allocator>
-    inline void
-    swap(map<_Key, _Tp, _Compare, _Allocator>&& __lhs,
-        map<_Key, _Tp, _Compare, _Allocator>& __rhs)
-    { __lhs.swap(__rhs); }
-
-  template<typename _Key, typename _Tp,
-          typename _Compare, typename _Allocator>
-    inline void
-    swap(map<_Key, _Tp, _Compare, _Allocator>& __lhs,
-        map<_Key, _Tp, _Compare, _Allocator>&& __rhs)
-    { __lhs.swap(__rhs); }
-#endif
-
 } // namespace __debug
 } // namespace std
 
index 42741dac5ae7f06e0f691f48f86b86266ded374a..16841ff86680ef87146905d2a22c3dc756497e9b 100644 (file)
@@ -248,11 +248,7 @@ namespace __debug
       }
 
       void
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
-      swap(multimap&& __x)
-#else
       swap(multimap& __x)
-#endif
       {
        _Base::swap(__x);
        this->_M_swap(__x);
@@ -378,22 +374,6 @@ namespace __debug
         multimap<_Key, _Tp, _Compare, _Allocator>& __rhs)
     { __lhs.swap(__rhs); }
 
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
-  template<typename _Key, typename _Tp,
-          typename _Compare, typename _Allocator>
-    inline void
-    swap(multimap<_Key, _Tp, _Compare, _Allocator>&& __lhs,
-        multimap<_Key, _Tp, _Compare, _Allocator>& __rhs)
-    { __lhs.swap(__rhs); }
-
-  template<typename _Key, typename _Tp,
-          typename _Compare, typename _Allocator>
-    inline void
-    swap(multimap<_Key, _Tp, _Compare, _Allocator>& __lhs,
-        multimap<_Key, _Tp, _Compare, _Allocator>&& __rhs)
-    { __lhs.swap(__rhs); }
-#endif
-
 } // namespace __debug
 } // namespace std
 
index 3e4ee86a2f54108116b8af34813ffedbfc5745ff..a952663ea31f3b95378509cca7ec3d7b31cdac64 100644 (file)
@@ -245,11 +245,7 @@ namespace __debug
       }
 
       void
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
-      swap(multiset&& __x)
-#else
       swap(multiset& __x)
-#endif
       {
        _Base::swap(__x);
        this->_M_swap(__x);
@@ -376,20 +372,6 @@ namespace __debug
         multiset<_Key, _Compare, _Allocator>& __y)
     { return __x.swap(__y); }
 
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
-  template<typename _Key, typename _Compare, typename _Allocator>
-    void
-    swap(multiset<_Key, _Compare, _Allocator>&& __x,
-        multiset<_Key, _Compare, _Allocator>& __y)
-    { return __x.swap(__y); }
-
-  template<typename _Key, typename _Compare, typename _Allocator>
-    void
-    swap(multiset<_Key, _Compare, _Allocator>& __x,
-        multiset<_Key, _Compare, _Allocator>&& __y)
-    { return __x.swap(__y); }
-#endif
-
 } // namespace __debug
 } // namespace std
 
index a025b3dec4583e0f99230b69aa495eaf83ac0faf..131b817d5fa4dd99db4a6e5291402a99d5caf5a0 100644 (file)
@@ -250,11 +250,7 @@ namespace __debug
       }
 
       void
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
-      swap(set&& __x)
-#else
       swap(set& __x)
-#endif
       {
        _Base::swap(__x);
        this->_M_swap(__x);
@@ -381,20 +377,6 @@ namespace __debug
         set<_Key, _Compare, _Allocator>& __y)
     { return __x.swap(__y); }
 
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
-  template<typename _Key, typename _Compare, typename _Allocator>
-    void
-    swap(set<_Key, _Compare, _Allocator>&& __x,
-        set<_Key, _Compare, _Allocator>& __y)
-    { return __x.swap(__y); }
-
-  template<typename _Key, typename _Compare, typename _Allocator>
-    void
-    swap(set<_Key, _Compare, _Allocator>& __x,
-        set<_Key, _Compare, _Allocator>&& __y)
-    { return __x.swap(__y); }
-#endif
-
 } // namespace __debug
 } // namespace std
 
index fd7c31eff9415023c0bae51ddae582ea2b84ccd9..93a720653a3ab93eadcd99b3af4a2be4af1621d6 100644 (file)
@@ -129,7 +129,7 @@ namespace __debug
       }
 
       void
-      swap(unordered_map&& __x)
+      swap(unordered_map& __x)
       {
        _Base::swap(__x);
        _Safe_base::_M_swap(__x);
@@ -314,20 +314,6 @@ namespace __debug
         unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __y)
     { __x.swap(__y); }
 
-  template<typename _Key, typename _Tp, typename _Hash,
-          typename _Pred, typename _Alloc>
-    inline void
-    swap(unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>&& __x,
-        unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __y)
-    { __x.swap(__y); }
-
-  template<typename _Key, typename _Tp, typename _Hash,
-          typename _Pred, typename _Alloc>
-    inline void
-    swap(unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
-        unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>&& __y)
-    { __x.swap(__y); }
-
 
   template<typename _Key, typename _Tp,
           typename _Hash = std::hash<_Key>,
@@ -415,7 +401,7 @@ namespace __debug
       }
 
       void
-      swap(unordered_multimap&& __x)
+      swap(unordered_multimap& __x)
       {
        _Base::swap(__x);
        _Safe_base::_M_swap(__x);
@@ -588,20 +574,6 @@ namespace __debug
         unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __y)
     { __x.swap(__y); }
 
-  template<typename _Key, typename _Tp, typename _Hash,
-          typename _Pred, typename _Alloc>
-    inline void
-    swap(unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>&& __x,
-        unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __y)
-    { __x.swap(__y); }
-
-  template<typename _Key, typename _Tp, typename _Hash,
-          typename _Pred, typename _Alloc>
-    inline void
-    swap(unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
-        unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>&& __y)
-    { __x.swap(__y); }
-
 } // namespace __debug
 } // namespace std
 
index d340442a21c268d9d5b42ca6c9bac88388d94ab3..96d0b0f3e35a8901d900d85fc20f71c891a2a8d7 100644 (file)
@@ -129,7 +129,7 @@ namespace __debug
       }
 
       void
-      swap(unordered_set&& __x)
+      swap(unordered_set& __x)
       {
        _Base::swap(__x);
        _Safe_base::_M_swap(__x);
@@ -313,18 +313,6 @@ namespace __debug
         unordered_set<_Value, _Hash, _Pred, _Alloc>& __y)
     { __x.swap(__y); }
 
-  template<typename _Value, typename _Hash, typename _Pred, typename _Alloc>
-    inline void
-    swap(unordered_set<_Value, _Hash, _Pred, _Alloc>&& __x,
-        unordered_set<_Value, _Hash, _Pred, _Alloc>& __y)
-    { __x.swap(__y); }
-
-  template<typename _Value, typename _Hash, typename _Pred, typename _Alloc>
-    inline void
-    swap(unordered_set<_Value, _Hash, _Pred, _Alloc>& __x,
-        unordered_set<_Value, _Hash, _Pred, _Alloc>&& __y)
-    { __x.swap(__y); }
-
 
   template<typename _Value,
           typename _Hash = std::hash<_Value>,
@@ -411,7 +399,7 @@ namespace __debug
       }
 
       void
-      swap(unordered_multiset&& __x)
+      swap(unordered_multiset& __x)
       {
        _Base::swap(__x);
        _Safe_base::_M_swap(__x);
@@ -583,18 +571,6 @@ namespace __debug
         unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __y)
     { __x.swap(__y); }
 
-  template<typename _Value, typename _Hash, typename _Pred, typename _Alloc>
-    inline void
-    swap(unordered_multiset<_Value, _Hash, _Pred, _Alloc>&& __x,
-        unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __y)
-    { __x.swap(__y); }
-
-  template<typename _Value, typename _Hash, typename _Pred, typename _Alloc>
-    inline void
-    swap(unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __x,
-        unordered_multiset<_Value, _Hash, _Pred, _Alloc>&& __y)
-    { __x.swap(__y); }
-
 } // namespace __debug
 } // namespace std
 
index 97ab7bf5846a4734fe2419e6cc04ea6abb126512..708ee455fe97de08085bf3f2859f6920f101197a 100644 (file)
@@ -452,11 +452,7 @@ namespace __debug
       }
 
       void
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
-      swap(vector&& __x)
-#else
       swap(vector& __x)
-#endif
       {
        _Base::swap(__x);
        this->_M_swap(__x);
@@ -533,18 +529,6 @@ namespace __debug
     swap(vector<_Tp, _Alloc>& __lhs, vector<_Tp, _Alloc>& __rhs)
     { __lhs.swap(__rhs); }
 
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
-  template<typename _Tp, typename _Alloc>
-    inline void
-    swap(vector<_Tp, _Alloc>&& __lhs, vector<_Tp, _Alloc>& __rhs)
-    { __lhs.swap(__rhs); }
-
-  template<typename _Tp, typename _Alloc>
-    inline void
-    swap(vector<_Tp, _Alloc>& __lhs, vector<_Tp, _Alloc>&& __rhs)
-    { __lhs.swap(__rhs); }
-#endif
-
 } // namespace __debug
 } // namespace std
 
index f15d6c674fef2c1f5543496f084d847debf5e86f..cfce575dc721829e3430f156457b5a54d4e2a6c2 100644 (file)
@@ -1439,11 +1439,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
        *  constant time.
       */
       void
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
-      swap(__versa_string&& __s)
-#else
       swap(__versa_string& __s)
-#endif
       { this->_M_swap(__s); }
 
       // String operations:
@@ -2335,22 +2331,6 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
         __versa_string<_CharT, _Traits, _Alloc, _Base>& __rhs)
     { __lhs.swap(__rhs); }
 
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
-  template<typename _CharT, typename _Traits, typename _Alloc,
-          template <typename, typename, typename> class _Base>
-    inline void
-    swap(__versa_string<_CharT, _Traits, _Alloc, _Base>&& __lhs,
-        __versa_string<_CharT, _Traits, _Alloc, _Base>& __rhs)
-    { __lhs.swap(__rhs); }
-
-  template<typename _CharT, typename _Traits, typename _Alloc,
-          template <typename, typename, typename> class _Base>
-    inline void
-    swap(__versa_string<_CharT, _Traits, _Alloc, _Base>& __lhs,
-        __versa_string<_CharT, _Traits, _Alloc, _Base>&& __rhs)
-    { __lhs.swap(__rhs); }
-#endif
-
 _GLIBCXX_END_NAMESPACE
 
 _GLIBCXX_BEGIN_NAMESPACE(std)
index f313ccb9b4071be680b5ff0dd734524ea0df7120..75595a97828edab523c0f322113f3d1262abf926 100644 (file)
@@ -555,7 +555,7 @@ namespace std
       }
 
       void
-      swap(unique_lock&& __u)
+      swap(unique_lock& __u)
       {
        std::swap(_M_device, __u._M_device);
        std::swap(_M_owns, __u._M_owns);
@@ -591,16 +591,6 @@ namespace std
     swap(unique_lock<_Mutex>& __x, unique_lock<_Mutex>& __y)
     { __x.swap(__y); }
 
-  template<typename _Mutex>
-    inline void
-    swap(unique_lock<_Mutex>&& __x, unique_lock<_Mutex>& __y)
-    { __x.swap(__y); }
-
-  template<typename _Mutex>
-    inline void
-    swap(unique_lock<_Mutex>& __x, unique_lock<_Mutex>&& __y)
-    { __x.swap(__y); }
-
   template<int _Idx>
     struct __unlock_impl
     {
index 8ce9e5cf6a5673a2f2c3ad33b4110020fbd1d026..fbdfe2ee53fcc42d6c90d264b0f07b423fb7dc23 100644 (file)
@@ -88,7 +88,7 @@ namespace std
 
       template<class _CharT, class _Traits>
        friend basic_ostream<_CharT, _Traits>&
-       operator<<(basic_ostream<_CharT, _Traits>&& __out, thread::id __id);
+       operator<<(basic_ostream<_CharT, _Traits>& __out, thread::id __id);
     };
 
     // Simple base type that the templatized, derived class containing
@@ -149,7 +149,7 @@ namespace std
     }
 
     void
-    swap(thread&& __t)
+    swap(thread& __t)
     { std::swap(_M_id, __t._M_id); }
 
     bool
@@ -194,14 +194,6 @@ namespace std
   swap(thread& __x, thread& __y)
   { __x.swap(__y); }
 
-  inline void
-  swap(thread&& __x, thread& __y)
-  { __x.swap(__y); }
-
-  inline void
-  swap(thread& __x, thread&& __y)
-  { __x.swap(__y); }
-
   inline bool
   operator!=(thread::id __x, thread::id __y)
   { return !(__x == __y); }
@@ -220,7 +212,7 @@ namespace std
 
   template<class _CharT, class _Traits>
     inline basic_ostream<_CharT, _Traits>&
-    operator<<(basic_ostream<_CharT, _Traits>&& __out, thread::id __id)
+    operator<<(basic_ostream<_CharT, _Traits>& __out, thread::id __id)
     {
       if (__id == thread::id())
        return __out << "thread::id of a non-executing thread";
index c5dbe6bcc82920c28ec4e7578ce9d659d46009d5..8dc8dcfc064acca04cffe9d6e9f15d208f9f9191 100644 (file)
@@ -77,7 +77,7 @@ namespace std
       _Head&       _M_head()       { return *this; }
       const _Head& _M_head() const { return *this; }
     
-      void _M_swap_impl(_Head&&) { /* no-op */ }
+      void _M_swap_impl(_Head&) { /* no-op */ }
     };
 
   template<std::size_t _Idx, typename _Head>
@@ -97,7 +97,7 @@ namespace std
       const _Head& _M_head() const { return _M_head_impl; }        
 
       void
-      _M_swap_impl(_Head&& __h)
+      _M_swap_impl(_Head& __h)
       { 
        using std::swap;
        swap(__h, _M_head_impl);
@@ -125,7 +125,7 @@ namespace std
     struct _Tuple_impl<_Idx>
     { 
     protected:
-      void _M_swap_impl(_Tuple_impl&&) { /* no-op */ }
+      void _M_swap_impl(_Tuple_impl&) { /* no-op */ }
     };
 
   /**
@@ -214,7 +214,7 @@ namespace std
 
     protected:
       void
-      _M_swap_impl(_Tuple_impl&& __in)
+      _M_swap_impl(_Tuple_impl& __in)
       {
        _Base::_M_swap_impl(__in._M_head());
        _Inherited::_M_swap_impl(__in._M_tail());
@@ -292,7 +292,7 @@ namespace std
        }
 
       void
-      swap(tuple&& __in)
+      swap(tuple& __in)
       { _Inherited::_M_swap_impl(__in); }
     };
 
@@ -301,7 +301,7 @@ namespace std
     class tuple<>
     {
     public:
-      void swap(tuple&&) { /* no-op */ }
+      void swap(tuple&) { /* no-op */ }
     };
 
   /// tuple (2-element), with construction and assignment from a pair.
@@ -394,7 +394,7 @@ namespace std
        }
 
       void
-      swap(tuple&& __in)
+      swap(tuple& __in)
       { 
        using std::swap;
        swap(this->_M_head(), __in._M_head());
@@ -665,16 +665,6 @@ namespace std
     swap(tuple<_Elements...>& __x, tuple<_Elements...>& __y)
     { __x.swap(__y); }
 
-  template<typename... _Elements>
-    inline void
-    swap(tuple<_Elements...>&& __x, tuple<_Elements...>& __y)
-    { __x.swap(__y); }
-
-  template<typename... _Elements>
-    inline void
-    swap(tuple<_Elements...>& __x, tuple<_Elements...>&& __y)
-    { __x.swap(__y); }
-
   // A class (and instance) which can be used in 'tie' when an element
   // of a tuple is not required
   struct _Swallow_assign
index 7c90983095f059bca04dde75b3274a59006161f1..bce550ff1f1460a2078e386cb1306ccdf3ab46fa 100644 (file)
@@ -225,11 +225,7 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
 
       ~_Hashtable();
 
-#ifdef _GLIBCXX_INCLUDE_AS_CXX0X
-      void swap(_Hashtable&&);
-#else
       void swap(_Hashtable&);
-#endif
 
       // Basic container operations
       iterator
@@ -732,11 +728,7 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
     void
     _Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal,
               _H1, _H2, _Hash, _RehashPolicy, __chc, __cit, __uk>::
-#ifdef _GLIBCXX_INCLUDE_AS_CXX0X
-    swap(_Hashtable&& __x)
-#else
     swap(_Hashtable& __x)
-#endif
     {
       // The only base class with member variables is hash_code_base.  We
       // define _Hash_code_base::_M_swap because different specializations
index cef6490424d263f6802cfe56911b9f1cde85e4d0..edf49789fa47b95b001fda6b54ad0ef3cf9ea349 100644 (file)
@@ -340,31 +340,5 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
         unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __y)
     { __x.swap(__y); }
 
-#ifdef _GLIBCXX_INCLUDE_AS_CXX0X
-  template<class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
-    inline void
-    swap(unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>&& __x,
-        unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __y)
-    { __x.swap(__y); }
-
-  template<class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
-    inline void
-    swap(unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
-        unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>&& __y)
-    { __x.swap(__y); }
-
-  template<class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
-    inline void
-    swap(unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>&& __x,
-        unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __y)
-    { __x.swap(__y); }
-
-  template<class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
-    inline void
-    swap(unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
-        unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>&& __y)
-    { __x.swap(__y); }
-#endif
-
 _GLIBCXX_END_NAMESPACE_TR1
 }
index fc2ce2b1eb4c155722f619b623135f224e512bc7..d52b1517d9179021753e3f6a1927a9b980a5631e 100644 (file)
@@ -330,31 +330,5 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
         unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __y)
     { __x.swap(__y); }
 
-#ifdef _GLIBCXX_INCLUDE_AS_CXX0X
-  template<class _Value, class _Hash, class _Pred, class _Alloc>
-    inline void
-    swap(unordered_set<_Value, _Hash, _Pred, _Alloc>&& __x,
-        unordered_set<_Value, _Hash, _Pred, _Alloc>& __y)
-    { __x.swap(__y); }
-
-  template<class _Value, class _Hash, class _Pred, class _Alloc>
-    inline void
-    swap(unordered_set<_Value, _Hash, _Pred, _Alloc>& __x,
-        unordered_set<_Value, _Hash, _Pred, _Alloc>&& __y)
-    { __x.swap(__y); }
-
-  template<class _Value, class _Hash, class _Pred, class _Alloc>
-    inline void
-    swap(unordered_multiset<_Value, _Hash, _Pred, _Alloc>&& __x,
-        unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __y)
-    { __x.swap(__y); }
-
-  template<class _Value, class _Hash, class _Pred, class _Alloc>
-    inline void
-    swap(unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __x,
-        unordered_multiset<_Value, _Hash, _Pred, _Alloc>&& __y)
-    { __x.swap(__y); }
-#endif
-
 _GLIBCXX_END_NAMESPACE_TR1
 }
diff --git a/libstdc++-v3/testsuite/20_util/shared_ptr/modifiers/swap_rvalue.cc b/libstdc++-v3/testsuite/20_util/shared_ptr/modifiers/swap_rvalue.cc
deleted file mode 100644 (file)
index 0ace59b..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-// { dg-options "-std=gnu++0x" }
-// { dg-do compile }
-
-// Copyright (C) 2008, 2009 Free Software Foundation
-//
-// This file is part of the GNU ISO C++ Library.  This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 3, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING3.  If not see
-// <http://www.gnu.org/licenses/>.
-
-// 20.7.12.2 Template class shared_ptr [util.smartptr.shared]
-
-#include <memory>
-#include <testsuite_hooks.h>
-
-struct A { };
-
-// 20.7.12.2.4 shared_ptr modifiers [util.smartptr.shared.mod]
-
-// swap
-int
-test01()
-{
-  bool test __attribute__((unused)) = true;
-
-  std::shared_ptr<A> p(new A);
-  p.swap(std::shared_ptr<A>(new A));
-
-  return 0;
-}
-
-int 
-main()
-{
-  test01();
-  return 0;
-}
index 9ec59fe693ea8b3c8a05b3a4852c8ef98c702a63..f7439944837a6695c4c3c352b947ac23ea6d3b43 100644 (file)
@@ -18,7 +18,7 @@
 // <http://www.gnu.org/licenses/>.
 
 // { dg-do compile }
-// { dg-error "no matching" "" { target *-*-* } 1498 }
+// { dg-error "no matching" "" { target *-*-* } 1494 }
 // { dg-excess-errors "" }
 
 #include <deque>
index 3bccae48034901b2a6acf8bbf9969b6acf5884dd..b1136f59cf7b784d7ac0254b0cf15b746d01c463 100644 (file)
@@ -18,7 +18,7 @@
 // <http://www.gnu.org/licenses/>.
 
 // { dg-do compile }
-// { dg-error "no matching" "" { target *-*-* } 1437 }
+// { dg-error "no matching" "" { target *-*-* } 1433 }
 // { dg-excess-errors "" }
 
 #include <deque>
index 3c401f1241e5930e79c0aacb623b848ecaa65055..8752a7e7b10b6c63323688d1cdedead27d09c705 100644 (file)
@@ -18,7 +18,7 @@
 // <http://www.gnu.org/licenses/>.
 
 // { dg-do compile }
-// { dg-error "no matching" "" { target *-*-* } 1437 }
+// { dg-error "no matching" "" { target *-*-* } 1433 }
 // { dg-excess-errors "" }
 
 #include <deque>
index 2e812d0a840501de348a0fee73b009cb4fd9241e..8cf322e821981662a92b5bca4161d49d3ac791a2 100644 (file)
@@ -18,7 +18,7 @@
 // <http://www.gnu.org/licenses/>.
 
 // { dg-do compile }
-// { dg-error "no matching" "" { target *-*-* } 1582 }
+// { dg-error "no matching" "" { target *-*-* } 1578 }
 // { dg-excess-errors "" }
 
 #include <deque>
index 759cea86fee525f01cac3a9c6ca1a6d326d43986..21d80cbb24b08c33aae340f63a6d5ee0f2740eb1 100644 (file)
@@ -43,10 +43,4 @@ namespace std {
 
   template <class T, class Allocator>
     void swap(forward_list<T,Allocator>& x, forward_list<T,Allocator>& y);
-
-  template <class T, class Allocator>
-    void swap(forward_list<T,Allocator>&& x, forward_list<T,Allocator>& y);
-
-  template <class T, class Allocator>
-    void swap(forward_list<T,Allocator>& x, forward_list<T,Allocator>&& y);
 }
index a32840fe859f1e46f4c661290ce3cd55f2ef77d9..e3c86f4056b89740691a1327b4f067c310df399d 100644 (file)
@@ -18,7 +18,7 @@
 // <http://www.gnu.org/licenses/>.
 
 // { dg-do compile }
-// { dg-error "no matching" "" { target *-*-* } 1383 }
+// { dg-error "no matching" "" { target *-*-* } 1379 }
 // { dg-excess-errors "" }
 
 #include <list>
index f8ab970a0dcd75d5659c80ddbe83d9c003c221e5..ef268014e2fedb9755bd9e19e0560989e86f6e56 100644 (file)
@@ -18,7 +18,7 @@
 // <http://www.gnu.org/licenses/>.
 
 // { dg-do compile }
-// { dg-error "no matching" "" { target *-*-* } 1352 }
+// { dg-error "no matching" "" { target *-*-* } 1348 }
 // { dg-excess-errors "" }
 
 #include <list>
index 56460a2faa5dcc1d9b150cf3c238de254c6be13c..41280156344cd3be36dc7dbaf9fc61ced50fb65d 100644 (file)
@@ -18,7 +18,7 @@
 // <http://www.gnu.org/licenses/>.
 
 // { dg-do compile }
-// { dg-error "no matching" "" { target *-*-* } 1352 }
+// { dg-error "no matching" "" { target *-*-* } 1348 }
 // { dg-excess-errors "" }
 
 #include <list>
index 9c4aba66d37415fcc54c2ff95ced0b24e2996f7c..f16fcfb2af35fd31cfa7c1be16720b997afe96ce 100644 (file)
@@ -18,7 +18,7 @@
 // <http://www.gnu.org/licenses/>.
 
 // { dg-do compile }
-// { dg-error "no matching" "" { target *-*-* } 1352 }
+// { dg-error "no matching" "" { target *-*-* } 1348 }
 // { dg-excess-errors "" }
 
 #include <list>
index 9cf809b63b80e236fe2ac7040e6d70d386aec296..5bff1fec07bf00679f2e11386e0e0976ce02ae28 100644 (file)
@@ -18,7 +18,7 @@
 // <http://www.gnu.org/licenses/>.
 
 // { dg-do compile }
-// { dg-error "no matching" "" { target *-*-* } 1051 }
+// { dg-error "no matching" "" { target *-*-* } 1047 }
 // { dg-excess-errors "" }
 
 #include <vector>
index 42b538599c10bc70933490a9163c47a1c7468023..a50f5226c0763e2e9423d77fd9214a2a4dd61431 100644 (file)
@@ -18,7 +18,7 @@
 // <http://www.gnu.org/licenses/>.
 
 // { dg-do compile }
-// { dg-error "no matching" "" { target *-*-* } 991 }
+// { dg-error "no matching" "" { target *-*-* } 987 }
 // { dg-excess-errors "" }
 
 #include <vector>
index 5d2b1558cabd0697f5294fe1105a9a2980aa08d0..a871cec9b5695e90b1be79dbef8260f0a51d6a71 100644 (file)
@@ -18,7 +18,7 @@
 // <http://www.gnu.org/licenses/>.
 
 // { dg-do compile }
-// { dg-error "no matching" "" { target *-*-* } 991 }
+// { dg-error "no matching" "" { target *-*-* } 987 }
 // { dg-excess-errors "" }
 
 #include <vector>
index 89b020b588f7ab13ea487d5fdfc5df413414f18a..d079335f7ae7b4a77cf5665ffc8b581b09ff5272 100644 (file)
@@ -18,7 +18,7 @@
 // <http://www.gnu.org/licenses/>.
 
 // { dg-do compile }
-// { dg-error "no matching" "" { target *-*-* } 1092 }
+// { dg-error "no matching" "" { target *-*-* } 1088 }
 // { dg-excess-errors "" }
 
 #include <vector>
index a30bf5129e9dc83905726e690b1795b2b170a6f6..2a820ad0799e9ba0ba185af65ed89ba866a1a83d 100644 (file)
 
 void f() { }
 
-int main()
+void test01()
 {
   bool test __attribute__((unused)) = true;
 
-  try 
+  try
     {
       std::thread t1(f);
       std::thread::id t1_id = t1.get_id();
       
       std::thread t2;
-      t2.swap(std::move(t1));
       
+      t2.swap(t1);
       VERIFY( t1.get_id() == std::thread::id() );
       VERIFY( t2.get_id() == t1_id );
+
+      t2.join();
+    }
+  catch (const std::system_error&)
+    {
+      VERIFY( false );
+    }
+  catch (...)
+    {
+      VERIFY( false );
+    }
+}
+
+void test02()
+{
+  bool test __attribute__((unused)) = true;
+
+  try
+    {
+      std::thread t1(f);
+      std::thread::id t1_id = t1.get_id();
+      
+      std::thread t2;
       
+      std::swap(t1, t2);
+      VERIFY( t1.get_id() == std::thread::id() );
+      VERIFY( t2.get_id() == t1_id );
+
       t2.join();
     }
   catch (const std::system_error&)
@@ -55,6 +82,12 @@ int main()
     {
       VERIFY( false );
     }
+}
+
+int main()
+{
+  test01();
+  test02();
 
   return 0;
 }
diff --git a/libstdc++-v3/testsuite/30_threads/thread/swap/2.cc b/libstdc++-v3/testsuite/30_threads/thread/swap/2.cc
deleted file mode 100644 (file)
index 62e6651..0000000
+++ /dev/null
@@ -1,112 +0,0 @@
-// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* } }
-// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* } }
-// { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } }
-// { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } }
-// { dg-require-cstdint "" }
-// { dg-require-gthreads "" }
-
-// Copyright (C) 2008, 2009 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library.  This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 3, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING3.  If not see
-// <http://www.gnu.org/licenses/>.
-
-
-#include <thread>
-#include <system_error>
-#include <bits/move.h> // std::move
-#include <testsuite_hooks.h>
-
-void f() { }
-
-void test01()
-{
-  try
-    {
-      std::thread t1(f);
-      std::thread::id t1_id = t1.get_id();
-      
-      std::thread t2;
-      std::swap(t1, t2);
-      
-      VERIFY( t1.get_id() == std::thread::id() );
-      VERIFY( t2.get_id() == t1_id );
-
-      t2.join();
-    }
- catch (const std::system_error&)
-   {
-     VERIFY( false );
-   }
- catch (...)
-   {
-     VERIFY( false );
-   }  
-}
-
-void test02()
-{
-  try
-    {
-      std::thread t1(f);
-      std::thread::id t1_id = t1.get_id();
-
-      std::thread t2;
-      std::swap(std::move(t1), t2);
-
-      VERIFY( t2.get_id() == t1_id );
-
-      t2.join();
-    }
-  catch (const std::system_error&)
-    {
-      VERIFY( false );
-    }
-  catch (...)
-    {
-      VERIFY( false );
-    }
-}
-
-void test03()
-{
-  try
-    {
-      std::thread t1(f);
-      std::thread::id t1_id = t1.get_id();
-
-      std::thread t2;
-      std::swap(t2, std::move(t1));
-
-      VERIFY( t2.get_id() == t1_id );
-      
-      t2.join();
-    }
-  catch (const std::system_error&)
-    {
-      VERIFY( false );
-    }
-  catch (...)
-    {
-      VERIFY( false );
-    }
-}
-
-int main()
-{
-  test01();
-  test02();
-  test03();
-  return 0;
-}