hashtable.h (_Hashtable<>::_Hashtable(_Hashtable&&)): Use std::move on the allocator...
authorPaolo Carlini <paolo.carlini@oracle.com>
Wed, 1 Jun 2011 14:16:19 +0000 (14:16 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Wed, 1 Jun 2011 14:16:19 +0000 (14:16 +0000)
2011-06-01  Paolo Carlini  <paolo.carlini@oracle.com>

* include/bits/hashtable.h (_Hashtable<>::_Hashtable(_Hashtable&&)):
Use std::move on the allocator, use noexcept.
(_Hashtable<>::~_Hashtable): Use noexcept.
* include/bits/stl_list.h: Likewise.
* include/bits/forward_list.h: Likewise.
* include/bits/stl_vector.h: Likewise.
* include/bits/stl_bvector.h: Likewise.
* include/bits/stl_map.h (map<>::map(map&&)): Use noexcept.
* include/bits/stl_set.h: Likewise.
* include/bits/stl_multimap.h: Likewise.
* include/bits/stl_multiset.h: Likewise.
* include/bits/stl_tree.h (_Rb_tree<>::_Rb_tree(_Rb_tree&&)): Use
std::move on the allocator.
(_Rb_tree<>::~_Rb_tree): Use noexcept.
* include/bits/stl_deque.h: Likewise.
* include/bits/basic_string.h (basic_string<>::~basic_string): Use
noexcept.
* include/ext/vstring.h (__versa_string<>::~__versa_string): Likewise.
* include/debug/set.h: Adjust.
* include/debug/unordered_map: Likewise.
* include/debug/multiset.h: Likewise.
* include/debug/forward_list: Likewise.
* include/debug/vector: Likewise.
* include/debug/unordered_set: Likewise.
* include/debug/deque: Likewise.
* include/debug/map.h: Likewise.
* include/debug/string: Likewise.
* include/debug/list: Likewise.
* include/debug/multimap.h: Likewise.
* include/profile/set.h: Likewise.
* include/profile/unordered_map: Likewise.
* include/profile/multiset.h: Likewise.
* include/profile/forward_list: Likewise.
* include/profile/unordered_set: Likewise.
* include/profile/vector: Likewise.
* include/profile/deque: Likewise.
* include/profile/map.h: Likewise.
* include/profile/list: Likewise.
* include/profile/multimap.h: Likewise.
* testsuite/21_strings/basic_string/cons/wchar_t/
noexcept_move_construct.cc: New.
* testsuite/21_strings/basic_string/cons/char/
noexcept_move_construct.cc: Likewise.
* testsuite/ext/vstring/cons/noexcept_move_construct.cc: Likewise.
* testsuite/23_containers/unordered_map/cons/
noexcept_move_construct.cc: Likewise.
* testsuite/23_containers/multimap/cons/
noexcept_move_construct.cc: Likewise.
* testsuite/23_containers/set/cons/
noexcept_move_construct.cc: Likewise.
* testsuite/23_containers/unordered_multimap/cons/
noexcept_move_construct.cc: Likewise.
* testsuite/23_containers/forward_list/cons/
noexcept_move_construct.cc: Likewise.
* testsuite/23_containers/unordered_set/cons/
noexcept_move_construct.cc: Likewise.
* testsuite/23_containers/vector/bool/cons/
noexcept_move_construct.cc: Likewise.
* testsuite/23_containers/vector/cons/
noexcept_move_construct.cc: Likewise.
* testsuite/23_containers/multiset/cons/
noexcept_move_construct.cc: Likewise.
* testsuite/23_containers/list/cons/
noexcept_move_construct.cc: Likewise.
* testsuite/23_containers/unordered_multiset/cons/
noexcept_move_construct.cc: Likewise.
* testsuite/23_containers/map/cons/noexcept_move_construct.cc
* testsuite/23_containers/forward_list/requirements/dr438/
assign_neg.cc: Adjust dg-error line numbers.
* testsuite/23_containers/forward_list/requirements/dr438/
insert_neg.cc: Likewise.
* testsuite/23_containers/forward_list/requirements/dr438/
constructor_1_neg.cc: Likewise.
* testsuite/23_containers/forward_list/requirements/dr438/
constructor_2_neg.cc: Likewise.
* testsuite/23_containers/vector/requirements/dr438/
assign_neg.cc: Likewise.
* testsuite/23_containers/vector/requirements/dr438/
insert_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/deque/requirements/dr438/
assign_neg.cc: Likewise.
* testsuite/23_containers/deque/requirements/dr438/
insert_neg.cc: Likewise.
* 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/list/requirements/dr438/
assign_neg.cc: Likewise.
* testsuite/23_containers/list/requirements/dr438/
insert_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.

* include/bits/move.h (swap): Use __and_ in the noexcept.
* include/bits/algorithmfwd.h: Adjust.

From-SVN: r174525

68 files changed:
libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/algorithmfwd.h
libstdc++-v3/include/bits/basic_string.h
libstdc++-v3/include/bits/forward_list.h
libstdc++-v3/include/bits/hashtable.h
libstdc++-v3/include/bits/move.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_set.h
libstdc++-v3/include/bits/stl_tree.h
libstdc++-v3/include/bits/stl_vector.h
libstdc++-v3/include/debug/deque
libstdc++-v3/include/debug/forward_list
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/string
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/profile/deque
libstdc++-v3/include/profile/forward_list
libstdc++-v3/include/profile/list
libstdc++-v3/include/profile/map.h
libstdc++-v3/include/profile/multimap.h
libstdc++-v3/include/profile/multiset.h
libstdc++-v3/include/profile/set.h
libstdc++-v3/include/profile/unordered_map
libstdc++-v3/include/profile/unordered_set
libstdc++-v3/include/profile/vector
libstdc++-v3/testsuite/21_strings/basic_string/cons/char/noexcept_move_construct.cc [new file with mode: 0644]
libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/noexcept_move_construct.cc [new file with mode: 0644]
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/forward_list/cons/noexcept_move_construct.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/forward_list/requirements/dr438/assign_neg.cc
libstdc++-v3/testsuite/23_containers/forward_list/requirements/dr438/constructor_1_neg.cc
libstdc++-v3/testsuite/23_containers/forward_list/requirements/dr438/constructor_2_neg.cc
libstdc++-v3/testsuite/23_containers/forward_list/requirements/dr438/insert_neg.cc
libstdc++-v3/testsuite/23_containers/list/cons/noexcept_move_construct.cc [new file with mode: 0644]
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/map/cons/noexcept_move_construct.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/multimap/cons/noexcept_move_construct.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/multiset/cons/noexcept_move_construct.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/set/cons/noexcept_move_construct.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/unordered_map/cons/noexcept_move_construct.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/unordered_multimap/cons/noexcept_move_construct.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/unordered_multiset/cons/noexcept_move_construct.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/unordered_set/cons/noexcept_move_construct.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/vector/bool/cons/noexcept_move_construct.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/vector/cons/noexcept_move_construct.cc [new file with mode: 0644]
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/ext/vstring/cons/noexcept_move_construct.cc [new file with mode: 0644]

index 6fcf67fe01fc8d3d6fe20f51537c3e5f020bf69c..0aac5ae28ed9cddc28b7921b5c3ec3be477c0e19 100644 (file)
@@ -1,3 +1,108 @@
+2011-06-01  Paolo Carlini  <paolo.carlini@oracle.com>
+
+       * include/bits/hashtable.h (_Hashtable<>::_Hashtable(_Hashtable&&)):
+       Use std::move on the allocator, use noexcept.
+       (_Hashtable<>::~_Hashtable): Use noexcept.
+       * include/bits/stl_list.h: Likewise.
+       * include/bits/forward_list.h: Likewise.
+       * include/bits/stl_vector.h: Likewise.
+       * include/bits/stl_bvector.h: Likewise.
+       * include/bits/stl_map.h (map<>::map(map&&)): Use noexcept.
+       * include/bits/stl_set.h: Likewise.
+       * include/bits/stl_multimap.h: Likewise.
+       * include/bits/stl_multiset.h: Likewise.
+       * include/bits/stl_tree.h (_Rb_tree<>::_Rb_tree(_Rb_tree&&)): Use
+       std::move on the allocator.
+       (_Rb_tree<>::~_Rb_tree): Use noexcept.
+       * include/bits/stl_deque.h: Likewise.
+       * include/bits/basic_string.h (basic_string<>::~basic_string): Use
+       noexcept.
+       * include/ext/vstring.h (__versa_string<>::~__versa_string): Likewise.
+       * include/debug/set.h: Adjust.
+       * include/debug/unordered_map: Likewise.
+       * include/debug/multiset.h: Likewise.
+       * include/debug/forward_list: Likewise.
+       * include/debug/vector: Likewise.
+       * include/debug/unordered_set: Likewise.
+       * include/debug/deque: Likewise.
+       * include/debug/map.h: Likewise.
+       * include/debug/string: Likewise.
+       * include/debug/list: Likewise.
+       * include/debug/multimap.h: Likewise.
+       * include/profile/set.h: Likewise.
+       * include/profile/unordered_map: Likewise.
+       * include/profile/multiset.h: Likewise.
+       * include/profile/forward_list: Likewise.
+       * include/profile/unordered_set: Likewise.
+       * include/profile/vector: Likewise.
+       * include/profile/deque: Likewise.
+       * include/profile/map.h: Likewise.
+       * include/profile/list: Likewise.
+       * include/profile/multimap.h: Likewise.
+       * testsuite/21_strings/basic_string/cons/wchar_t/
+       noexcept_move_construct.cc: New.
+       * testsuite/21_strings/basic_string/cons/char/
+       noexcept_move_construct.cc: Likewise.
+       * testsuite/ext/vstring/cons/noexcept_move_construct.cc: Likewise.
+       * testsuite/23_containers/unordered_map/cons/
+       noexcept_move_construct.cc: Likewise.
+       * testsuite/23_containers/multimap/cons/
+       noexcept_move_construct.cc: Likewise.
+       * testsuite/23_containers/set/cons/
+       noexcept_move_construct.cc: Likewise.
+       * testsuite/23_containers/unordered_multimap/cons/
+       noexcept_move_construct.cc: Likewise.
+       * testsuite/23_containers/forward_list/cons/
+       noexcept_move_construct.cc: Likewise.
+       * testsuite/23_containers/unordered_set/cons/
+       noexcept_move_construct.cc: Likewise.
+       * testsuite/23_containers/vector/bool/cons/
+       noexcept_move_construct.cc: Likewise.
+       * testsuite/23_containers/vector/cons/
+       noexcept_move_construct.cc: Likewise.
+       * testsuite/23_containers/multiset/cons/
+       noexcept_move_construct.cc: Likewise.
+       * testsuite/23_containers/list/cons/
+       noexcept_move_construct.cc: Likewise.
+       * testsuite/23_containers/unordered_multiset/cons/
+       noexcept_move_construct.cc: Likewise.
+       * testsuite/23_containers/map/cons/noexcept_move_construct.cc
+       * testsuite/23_containers/forward_list/requirements/dr438/
+       assign_neg.cc: Adjust dg-error line numbers.
+       * testsuite/23_containers/forward_list/requirements/dr438/
+       insert_neg.cc: Likewise.
+       * testsuite/23_containers/forward_list/requirements/dr438/
+       constructor_1_neg.cc: Likewise.
+       * testsuite/23_containers/forward_list/requirements/dr438/
+       constructor_2_neg.cc: Likewise.
+       * testsuite/23_containers/vector/requirements/dr438/
+       assign_neg.cc: Likewise.
+       * testsuite/23_containers/vector/requirements/dr438/
+       insert_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/deque/requirements/dr438/
+       assign_neg.cc: Likewise.
+       * testsuite/23_containers/deque/requirements/dr438/
+       insert_neg.cc: Likewise.
+       * 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/list/requirements/dr438/
+       assign_neg.cc: Likewise.
+       * testsuite/23_containers/list/requirements/dr438/
+       insert_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.
+
+       * include/bits/move.h (swap): Use __and_ in the noexcept.
+       * include/bits/algorithmfwd.h: Adjust.
+
 2011-05-31  Paolo Carlini  <paolo.carlini@oracle.com>
 
        * include/bits/basic_string.h: Use noexcept per the FDIS (minus
index fe3b68f6a25c7dac6732f2083b4e4967e508e285..bb7ca250333de21f189d41d0e7441c7d6d33fbc2 100644 (file)
@@ -551,8 +551,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
     void 
     swap(_Tp&, _Tp&)
 #ifdef __GXX_EXPERIMENTAL_CXX0X__
-    noexcept(is_nothrow_move_constructible<_Tp>::value
-            && is_nothrow_move_assignable<_Tp>::value)
+    noexcept(__and_<is_nothrow_move_constructible<_Tp>,
+                   is_nothrow_move_assignable<_Tp>>::value)
 #endif
     ;
 
index f82cfbb85b2406225033565dccf2f09f6d662610..9279a38cf4c0317c1662b23ccadf9dd7b5d6b9e0 100644 (file)
@@ -530,7 +530,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
       /**
        *  @brief  Destroy the string instance.
        */
-      ~basic_string()
+      ~basic_string() _GLIBCXX_NOEXCEPT
       { _M_rep()->_M_dispose(this->get_allocator()); }
 
       /**
index 1e242f3f760c87b50b1daf7af549ced7c5f4ad53..df96c88cb99f358ae46c1c115beb6cd5873708c8 100644 (file)
@@ -290,6 +290,10 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
         _Fwd_list_impl(const _Node_alloc_type& __a)
         : _Node_alloc_type(__a), _M_head()
         { }
+
+        _Fwd_list_impl(_Node_alloc_type&& __a)
+       : _Node_alloc_type(std::move(__a)), _M_head()
+        { }
       };
 
       _Fwd_list_impl _M_impl;
@@ -323,7 +327,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
       }
 
       _Fwd_list_base(_Fwd_list_base&& __lst)
-      : _M_impl(__lst._M_get_Node_allocator())
+      : _M_impl(std::move(__lst._M_get_Node_allocator()))
       {
        this->_M_impl._M_head._M_next = __lst._M_impl._M_head._M_next;
        __lst._M_impl._M_head._M_next = 0;
@@ -523,7 +527,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
        *  forward_list. The contents of @a list are a valid, but unspecified
        *  %forward_list.
        */
-      forward_list(forward_list&& __list)
+      forward_list(forward_list&& __list) noexcept
       : _Base(std::move(__list)) { }
 
       /**
@@ -542,7 +546,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
       /**
        *  @brief  The forward_list dtor.
        */
-      ~forward_list()
+      ~forward_list() noexcept
       { }
 
       /**
index fd6bc32b0d8435375bbd8786116fdf16fd7449e8..d72c78bbdf2cdedd03567b52083e2883cffecb91 100644 (file)
@@ -213,8 +213,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
 
       _Hashtable(const _Hashtable&);
 
-      _Hashtable(_Hashtable&&);
-
+      _Hashtable(_Hashtable&&)
+      noexcept(__and_<is_nothrow_copy_constructible<_Equal>,
+                     is_nothrow_copy_constructible<_H1>>::value);
       _Hashtable&
       operator=(const _Hashtable& __ht)
       {
@@ -233,7 +235,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
        return *this;
       }
 
-      ~_Hashtable();
+      ~_Hashtable() noexcept;
 
       void swap(_Hashtable&);
 
@@ -672,11 +674,13 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
     _Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal,
               _H1, _H2, _Hash, _RehashPolicy, __chc, __cit, __uk>::
     _Hashtable(_Hashtable&& __ht)
+    noexcept(__and_<is_nothrow_copy_constructible<_Equal>,
+                   is_nothrow_copy_constructible<_H1>>::value)
     : __detail::_Rehash_base<_RehashPolicy, _Hashtable>(__ht),
       __detail::_Hash_code_base<_Key, _Value, _ExtractKey, _Equal,
                                _H1, _H2, _Hash, __chc>(__ht),
       __detail::_Map_base<_Key, _Value, _ExtractKey, __uk, _Hashtable>(__ht),
-      _M_node_allocator(__ht._M_node_allocator),
+      _M_node_allocator(std::move(__ht._M_node_allocator)),
       _M_buckets(__ht._M_buckets),
       _M_bucket_count(__ht._M_bucket_count),
       _M_begin_bucket_index(__ht._M_begin_bucket_index),
@@ -697,7 +701,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
           bool __chc, bool __cit, bool __uk>
     _Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal,
               _H1, _H2, _Hash, _RehashPolicy, __chc, __cit, __uk>::
-    ~_Hashtable()
+    ~_Hashtable() noexcept
     {
       clear();
       _M_deallocate_buckets(_M_buckets, _M_bucket_count);
index 963dd4c655d4069a392597c92e02611e1dcd74eb..ca7686eb1623739767ff701b8bd409900cf1453e 100644 (file)
@@ -136,8 +136,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
     inline void
     swap(_Tp& __a, _Tp& __b)
 #ifdef __GXX_EXPERIMENTAL_CXX0X__
-    noexcept(is_nothrow_move_constructible<_Tp>::value
-            && is_nothrow_move_assignable<_Tp>::value)
+    noexcept(__and_<is_nothrow_move_constructible<_Tp>,
+                   is_nothrow_move_assignable<_Tp>>::value)
 #endif
     {
       // concept requirements
index 47156418509b8bc0db265b27d63e425a9542af2d..edf662987cb7852b75574d8e15dba7b1d7aa03a9 100644 (file)
@@ -392,6 +392,13 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
        _Bvector_impl(const _Bit_alloc_type& __a)
        : _Bit_alloc_type(__a), _M_start(), _M_finish(), _M_end_of_storage(0)
        { }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+       _Bvector_impl(_Bit_alloc_type&& __a)
+       : _Bit_alloc_type(std::move(__a)), _M_start(), _M_finish(),
+         _M_end_of_storage(0)
+       { }
+#endif
       };
 
     public:
@@ -416,8 +423,8 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
       : _M_impl(__a) { }
 
 #ifdef __GXX_EXPERIMENTAL_CXX0X__
-      _Bvector_base(_Bvector_base&& __x)
-      : _M_impl(__x._M_get_Bit_allocator())
+      _Bvector_base(_Bvector_base&& __x) noexcept
+      : _M_impl(std::move(__x._M_get_Bit_allocator()))
       {
        this->_M_impl._M_start = __x._M_impl._M_start;
        this->_M_impl._M_finish = __x._M_impl._M_finish;
@@ -532,7 +539,7 @@ template<typename _Alloc>
     }
 
 #ifdef __GXX_EXPERIMENTAL_CXX0X__
-    vector(vector&& __x)
+    vector(vector&& __x) noexcept
     : _Base(std::move(__x)) { }
 
     vector(initializer_list<bool> __l,
@@ -553,7 +560,7 @@ template<typename _Alloc>
        _M_initialize_dispatch(__first, __last, _Integral());
       }
 
-    ~vector() { }
+    ~vector() _GLIBCXX_NOEXCEPT { }
 
     vector&
     operator=(const vector& __x)
index 209287b56fcae3d4c7d957e43273c2f49f2008d7..7ddfbc5ac16846376caa0a5ef1533a0638e5efc7 100644 (file)
@@ -465,7 +465,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
 
 #ifdef __GXX_EXPERIMENTAL_CXX0X__
       _Deque_base(_Deque_base&& __x)
-      : _M_impl(__x._M_get_Tp_allocator())
+      : _M_impl(std::move(__x._M_get_Tp_allocator()))
       {
        _M_initialize_map(0);
        if (__x._M_impl._M_map)
@@ -505,6 +505,13 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
        : _Tp_alloc_type(__a), _M_map(0), _M_map_size(0),
          _M_start(), _M_finish()
        { }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+       _Deque_impl(_Tp_alloc_type&& __a)
+       : _Tp_alloc_type(std::move(__a)), _M_map(0), _M_map_size(0),
+         _M_start(), _M_finish()
+       { }
+#endif
       };
 
       _Tp_alloc_type&
@@ -894,7 +901,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
        *  themselves are pointers, the pointed-to memory is not touched in any
        *  way.  Managing the pointer is the user's responsibility.
        */
-      ~deque()
+      ~deque() _GLIBCXX_NOEXCEPT
       { _M_destroy_data(begin(), end(), _M_get_Tp_allocator()); }
 
       /**
index 5144bb67e7bbce7384d5abd141c03dbc3a097adf..96995994185a12d54f1d1b37e3f3cbdad05806ae 100644 (file)
@@ -318,6 +318,12 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
        _List_impl(const _Node_alloc_type& __a)
        : _Node_alloc_type(__a), _M_node()
        { }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+       _List_impl(_Node_alloc_type&& __a)
+       : _Node_alloc_type(std::move(__a)), _M_node()
+       { }
+#endif
       };
 
       _List_impl _M_impl;
@@ -359,7 +365,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
 
 #ifdef __GXX_EXPERIMENTAL_CXX0X__
       _List_base(_List_base&& __x)
-      : _M_impl(__x._M_get_Node_allocator())
+      : _M_impl(std::move(__x._M_get_Node_allocator()))
       {
        _M_init();
        __detail::_List_node_base::swap(this->_M_impl._M_node, 
@@ -368,7 +374,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
 #endif
 
       // This is what actually destroys the list.
-      ~_List_base()
+      ~_List_base() _GLIBCXX_NOEXCEPT
       { _M_clear(); }
 
       void
@@ -580,7 +586,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
        *  The newly-created %list contains the exact contents of @a x.
        *  The contents of @a x are a valid, but unspecified %list.
        */
-      list(list&& __x)
+      list(list&& __x) noexcept
       : _Base(std::move(__x)) { }
 
       /**
index 49341c998de66444d3eed5204752f9c0f4fb7f0e..3ca683791d8500ac172b0c643dc2b78f68832b04 100644 (file)
@@ -181,6 +181,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
        *  The contents of @a x are a valid, but unspecified %map.
        */
       map(map&& __x)
+      noexcept(is_nothrow_copy_constructible<_Compare>::value)
       : _M_t(std::move(__x._M_t)) { }
 
       /**
index bc677262a322e3e9f602bf674ee71af9b50b2a4b..58811317228fc7b4f8fe1448d11c189ed684f89b 100644 (file)
@@ -179,6 +179,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
        *  The contents of @a x are a valid, but unspecified %multimap.
        */
       multimap(multimap&& __x)
+      noexcept(is_nothrow_copy_constructible<_Compare>::value)
       : _M_t(std::move(__x._M_t)) { }
 
       /**
index c3e686adeb1f59334f63d69ab276dfa9baf6ceb9..d5d94ebe7c921b4e2f64219a4e95b747c8f18269 100644 (file)
@@ -192,6 +192,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
        *  The contents of @a x are a valid, but unspecified %multiset.
        */
       multiset(multiset&& __x)
+      noexcept(is_nothrow_copy_constructible<_Compare>::value)
       : _M_t(std::move(__x._M_t)) { }
 
       /**
index aa89a8a21cb8a5c02850be56dcf3e16d36391264..9676d909f693da756bf10b3e0aad532087a4cce8 100644 (file)
@@ -199,6 +199,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
        *  The contents of @a x are a valid, but unspecified %set.
        */
       set(set&& __x)
+      noexcept(is_nothrow_copy_constructible<_Compare>::value)
       : _M_t(std::move(__x._M_t)) { }
 
       /**
index 7ba6061a674c1a080262ab6f2ac2bb88facfa921..3b291c5bdb9b34b1dc08b087c874e06081550d05 100644 (file)
@@ -450,6 +450,13 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
            _M_node_count(0)
          { _M_initialize(); }
 
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+         _Rb_tree_impl(const _Key_compare& __comp, _Node_allocator&& __a)
+         : _Node_allocator(std::move(__a)), _M_key_compare(__comp),
+           _M_header(), _M_node_count(0)
+         { _M_initialize(); }
+#endif
+
        private:
          void
          _M_initialize()
@@ -635,7 +642,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
       _Rb_tree(_Rb_tree&& __x);
 #endif
 
-      ~_Rb_tree()
+      ~_Rb_tree() _GLIBCXX_NOEXCEPT
       { _M_erase(_M_begin()); }
 
       _Rb_tree&
@@ -900,7 +907,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
            typename _Compare, typename _Alloc>
     _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::
     _Rb_tree(_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>&& __x)
-    : _M_impl(__x._M_impl._M_key_compare, __x._M_get_Node_allocator())
+    : _M_impl(__x._M_impl._M_key_compare,
+             std::move(__x._M_get_Node_allocator()))
     {
       if (__x._M_root() != 0)
        {
index 40770b1cd5ad74eb687ae70d8fdf0b1a95dfd5ad..5fa5f522e0c9f89bf0db77824f105d14a32293a1 100644 (file)
@@ -86,6 +86,13 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
        _Vector_impl(_Tp_alloc_type const& __a)
        : _Tp_alloc_type(__a), _M_start(0), _M_finish(0), _M_end_of_storage(0)
        { }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+       _Vector_impl(_Tp_alloc_type&& __a)
+       : _Tp_alloc_type(std::move(__a)),
+         _M_start(0), _M_finish(0), _M_end_of_storage(0)
+       { }
+#endif
       };
       
     public:
@@ -127,7 +134,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
 
 #ifdef __GXX_EXPERIMENTAL_CXX0X__
       _Vector_base(_Vector_base&& __x)
-      : _M_impl(__x._M_get_Tp_allocator())
+      : _M_impl(std::move(__x._M_get_Tp_allocator()))
       {
        this->_M_impl._M_start = __x._M_impl._M_start;
        this->_M_impl._M_finish = __x._M_impl._M_finish;
@@ -291,7 +298,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
        *  The newly-created %vector contains the exact contents of @a x.
        *  The contents of @a x are a valid, but unspecified %vector.
        */
-      vector(vector&& __x)
+      vector(vector&& __x) noexcept
       : _Base(std::move(__x)) { }
 
       /**
@@ -346,7 +353,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
        *  not touched in any way.  Managing the pointer is the user's
        *  responsibility.
        */
-      ~vector()
+      ~vector() _GLIBCXX_NOEXCEPT
       { std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish,
                      _M_get_Tp_allocator()); }
 
index 1756328e4e0b32e4f3c8daf4a56d6fa91271a6b7..749fc2e6cab46927ddbe0530c1851de3e97f320b 100644 (file)
@@ -113,7 +113,7 @@ namespace __debug
       : _Base(__l, __a), _Safe_base() { }
 #endif
 
-      ~deque() { }
+      ~deque() _GLIBCXX_NOEXCEPT { }
 
       deque&
       operator=(const deque& __x)
index 8f8d0eb80a56fcaada3609c4cf5e932cded82568..9f1da5b679f067d2d9b514e8a2f99418628b531d 100644 (file)
@@ -104,7 +104,7 @@ namespace __debug
       : _Base(__list)
       { }
 
-      forward_list(forward_list&& __list)
+      forward_list(forward_list&& __list) noexcept
       : _Base(std::move(__list._M_base()))
       {
        this->_M_swap(__list);
@@ -115,7 +115,7 @@ namespace __debug
       : _Base(__il, __al)
       { }
 
-      ~forward_list()
+      ~forward_list() noexcept
       { }
 
       forward_list&
index 45c53ff7515dbd5e2252a84e1b83699735f3ac06..44a208bfe5201ab04cbf2b7e950899fa6412dc07 100644 (file)
@@ -106,7 +106,7 @@ namespace __debug
       : _Base(__x), _Safe_base() { }
 
 #ifdef __GXX_EXPERIMENTAL_CXX0X__
-      list(list&& __x)
+      list(list&& __x) noexcept
       : _Base(std::move(__x)), _Safe_base()
       { this->_M_swap(__x); }
 
@@ -115,7 +115,7 @@ namespace __debug
         : _Base(__l, __a), _Safe_base() { }
 #endif
 
-      ~list() { }
+      ~list() _GLIBCXX_NOEXCEPT { }
 
       list&
       operator=(const list& __x)
index 04f8b083f790080a685fe2c57e45a4766450dd6e..9f80251e3ae94d50651e6666c2be0121e48cf1ad 100644 (file)
@@ -95,6 +95,7 @@ namespace __debug
 
 #ifdef __GXX_EXPERIMENTAL_CXX0X__
       map(map&& __x)
+      noexcept(is_nothrow_copy_constructible<_Compare>::value)
       : _Base(std::move(__x)), _Safe_base()
       { this->_M_swap(__x); }
 
@@ -104,7 +105,7 @@ namespace __debug
       : _Base(__l, __c, __a), _Safe_base() { }
 #endif
 
-      ~map() { }
+      ~map() _GLIBCXX_NOEXCEPT { }
 
       map&
       operator=(const map& __x)
index 0be2fa38dd20ca1bac2f716976bc0c8facda401e..b3c43b8bfa26aad4d921150a6cb21604956b13c7 100644 (file)
@@ -96,6 +96,7 @@ namespace __debug
 
 #ifdef __GXX_EXPERIMENTAL_CXX0X__
       multimap(multimap&& __x)
+      noexcept(is_nothrow_copy_constructible<_Compare>::value)
       : _Base(std::move(__x)), _Safe_base()
       { this->_M_swap(__x); }
 
@@ -105,7 +106,7 @@ namespace __debug
       : _Base(__l, __c, __a), _Safe_base() { }
 #endif
 
-      ~multimap() { }
+      ~multimap() _GLIBCXX_NOEXCEPT { }
 
       multimap&
       operator=(const multimap& __x)
index a9756f533039da7bee80348926b57075c40a4ff3..ee4c04735dd81e93a41cd6015b38ac59988db9e9 100644 (file)
@@ -95,6 +95,7 @@ namespace __debug
 
 #ifdef __GXX_EXPERIMENTAL_CXX0X__
       multiset(multiset&& __x)
+      noexcept(is_nothrow_copy_constructible<_Compare>::value)
       : _Base(std::move(__x)), _Safe_base()
       { this->_M_swap(__x); }
 
@@ -104,7 +105,7 @@ namespace __debug
       : _Base(__l, __comp, __a), _Safe_base() { }
 #endif
 
-      ~multiset() { }
+      ~multiset() _GLIBCXX_NOEXCEPT { }
 
       multiset&
       operator=(const multiset& __x)
index fddd1673149961859dd37a66ceb278b719d1f47a..fd6a607d0139d92f2ec4ea5333a4b6bb3af5aaab 100644 (file)
@@ -1,6 +1,6 @@
 // Debugging set implementation -*- C++ -*-
 
-// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
+// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
 // Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
@@ -95,6 +95,7 @@ namespace __debug
 
 #ifdef __GXX_EXPERIMENTAL_CXX0X__
       set(set&& __x)
+      noexcept(is_nothrow_copy_constructible<_Compare>::value)
       : _Base(std::move(__x)), _Safe_base()
       { this->_M_swap(__x); }
 
@@ -104,7 +105,7 @@ namespace __debug
       : _Base(__l, __comp, __a), _Safe_base() { }
 #endif
 
-      ~set() { }
+      ~set() _GLIBCXX_NOEXCEPT { }
 
       set&
       operator=(const set& __x)
index 0af690128c9dbaf50f7d72533b2bdb95c1cef8fa..b6d2b4b34ea54949973a1a4af6da7f4d0abb3e1e 100644 (file)
@@ -124,7 +124,7 @@ namespace __gnu_debug
     { }
 #endif // __GXX_EXPERIMENTAL_CXX0X__
 
-    ~basic_string() { }
+    ~basic_string() _GLIBCXX_NOEXCEPT { }
 
     basic_string&
     operator=(const basic_string& __str)
index b3295fba5a62798b46b2ce48a4ed09b8aae045e2..7a4265c7b0d3e272328d83471b365438fefa2bda 100644 (file)
@@ -1,6 +1,6 @@
 // Debugging unordered_map/unordered_multimap implementation -*- C++ -*-
 
-// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
+// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
 // Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
@@ -98,6 +98,8 @@ namespace __debug
       : _Base(__x), _Safe_base() { }
 
       unordered_map(unordered_map&& __x)
+      noexcept(__and_<is_nothrow_copy_constructible<_Hash>,
+                     is_nothrow_copy_constructible<_Pred>>::value)
       : _Base(std::move(__x)), _Safe_base() { }
 
       unordered_map(initializer_list<value_type> __l,
@@ -107,6 +109,8 @@ namespace __debug
                    const allocator_type& __a = allocator_type())
       : _Base(__l, __n, __hf, __eql, __a), _Safe_base() { }
 
+      ~unordered_map() noexcept { }
+
       unordered_map&
       operator=(const unordered_map& __x)
       {
@@ -385,7 +389,9 @@ namespace __debug
       unordered_multimap(const _Base& __x) 
       : _Base(__x), _Safe_base() { }
 
-      unordered_multimap(unordered_multimap&& __x) 
+      unordered_multimap(unordered_multimap&& __x)
+      noexcept(__and_<is_nothrow_copy_constructible<_Hash>,
+                     is_nothrow_copy_constructible<_Pred>>::value)
       : _Base(std::move(__x)), _Safe_base() { }
 
       unordered_multimap(initializer_list<value_type> __l,
@@ -395,6 +401,8 @@ namespace __debug
                         const allocator_type& __a = allocator_type())
       : _Base(__l, __n, __hf, __eql, __a), _Safe_base() { }
 
+      ~unordered_multimap() noexcept { }
+
       unordered_multimap&
       operator=(const unordered_multimap& __x)
       {
index d67e98775adf538ba396e7dd5ce3c04e7fc8aeeb..46dff272bb26ec63a73ba4ab856e830a366ca13e 100644 (file)
@@ -97,7 +97,9 @@ namespace __debug
       unordered_set(const _Base& __x) 
       : _Base(__x), _Safe_base() { }
 
-      unordered_set(unordered_set&& __x) 
+      unordered_set(unordered_set&& __x)
+      noexcept(__and_<is_nothrow_copy_constructible<_Hash>,
+                     is_nothrow_copy_constructible<_Pred>>::value)
       : _Base(std::move(__x)), _Safe_base() { }
 
       unordered_set(initializer_list<value_type> __l,
@@ -107,6 +109,8 @@ namespace __debug
                    const allocator_type& __a = allocator_type())
       : _Base(__l, __n, __hf, __eql, __a), _Safe_base() { }
 
+      ~unordered_set() noexcept { }
+
       unordered_set&
       operator=(const unordered_set& __x)
       {
@@ -374,7 +378,9 @@ namespace __debug
       unordered_multiset(const _Base& __x) 
       : _Base(__x), _Safe_base() { }
 
-      unordered_multiset(unordered_multiset&& __x) 
+      unordered_multiset(unordered_multiset&& __x)
+      noexcept(__and_<is_nothrow_copy_constructible<_Hash>,
+                     is_nothrow_copy_constructible<_Pred>>::value)
       : _Base(std::move(__x)), _Safe_base() { }
 
       unordered_multiset(initializer_list<value_type> __l,
@@ -384,6 +390,8 @@ namespace __debug
                         const allocator_type& __a = allocator_type())
       : _Base(__l, __n, __hf, __eql, __a), _Safe_base() { }
 
+      ~unordered_multiset() noexcept { }
+
       unordered_multiset&
       operator=(const unordered_multiset& __x)
       {
index f5bdde42bfc9410fdef8922b0414b46b4cd5ed6f..6072515dac3d6ecc97617ae5106003c8fc5d319d 100644 (file)
@@ -109,7 +109,7 @@ namespace __debug
       : _Base(__x), _Safe_base(), _M_guaranteed_capacity(__x.size()) { }
 
 #ifdef __GXX_EXPERIMENTAL_CXX0X__
-      vector(vector&& __x)
+      vector(vector&& __x) noexcept
       : _Base(std::move(__x)), _Safe_base(),
        _M_guaranteed_capacity(this->size())
       {
@@ -123,7 +123,7 @@ namespace __debug
        _M_guaranteed_capacity(__l.size()) { }
 #endif
 
-      ~vector() { }
+      ~vector() _GLIBCXX_NOEXCEPT { }
 
       vector&
       operator=(const vector& __x)
index 08e85264655ccaef58ac8246d6d76048ec7f6161..a84336861a7fe159f16d5387f3c596dd2607e2a4 100644 (file)
@@ -243,7 +243,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
       /**
        *  @brief  Destroy the string instance.
        */
-      ~__versa_string() { }    
+      ~__versa_string() _GLIBCXX_NOEXCEPT { }  
 
       /**
        *  @brief  Assign the value of @a str to this string.
index 564c2dd0fce8afd4370533d02cd1f1e4172df85f..48a18c984d98ff98f2affdcbc9cc1b71086888dc 100644 (file)
@@ -101,7 +101,7 @@ namespace __profile
       : _Base(__l, __a) { }
 #endif
 
-      ~deque() { }
+      ~deque() _GLIBCXX_NOEXCEPT { }
 
       deque&
       operator=(const deque& __x)
index 75b59f354a202ea390359ae3bfb295f9a924776d..618b2480caa8ed0c69e2bfa5bcde0e343d10aef6 100644 (file)
@@ -83,7 +83,7 @@ namespace __profile
       : _Base(__list)
       { }
 
-      forward_list(forward_list&& __list)
+      forward_list(forward_list&& __list) noexcept
       : _Base(std::move(__list)) { }
 
       forward_list(std::initializer_list<_Tp> __il,
@@ -91,7 +91,7 @@ namespace __profile
       : _Base(__il, __al)
       { }
 
-      ~forward_list()
+      ~forward_list() noexcept
       { }
 
       forward_list&
index 589f8f5362b6d1b15ce385429fb49035cc50a134..33b1ae64d87951de818947caf8659b127e82d8f0 100644 (file)
@@ -67,7 +67,7 @@ template<typename _Tp, typename _Allocator = std::allocator<_Tp> >
       explicit
       list(const _Allocator& __a = _Allocator())
       : _Base(__a) 
-      { 
+      {
         __profcxx_list_construct(this);        // list2slist
         __profcxx_list_construct2(this);       // list2vector
       }
@@ -76,7 +76,7 @@ template<typename _Tp, typename _Allocator = std::allocator<_Tp> >
       explicit
       list(size_type __n)
       : _Base(__n) 
-      { 
+      {
         __profcxx_list_construct(this); 
         __profcxx_list_construct2(this); 
       }
@@ -84,7 +84,7 @@ template<typename _Tp, typename _Allocator = std::allocator<_Tp> >
       list(size_type __n, const _Tp& __value,
           const _Allocator& __a = _Allocator())
       : _Base(__n, __value, __a) 
-      { 
+      {
         __profcxx_list_construct(this); 
         __profcxx_list_construct2(this); 
       }
@@ -93,7 +93,7 @@ template<typename _Tp, typename _Allocator = std::allocator<_Tp> >
       list(size_type __n, const _Tp& __value = _Tp(),
           const _Allocator& __a = _Allocator())
       : _Base(__n, __value, __a) 
-      { 
+      {
         __profcxx_list_construct(this); 
         __profcxx_list_construct2(this); 
       }
@@ -103,29 +103,29 @@ template<typename _Tp, typename _Allocator = std::allocator<_Tp> >
       list(_InputIterator __first, _InputIterator __last,
           const _Allocator& __a = _Allocator())
       : _Base(__first, __last, __a)
-      {         
+      {
         __profcxx_list_construct(this); 
         __profcxx_list_construct2(this); 
       }
 
       list(const list& __x)
       : _Base(__x) 
-      { 
+      {
         __profcxx_list_construct(this); 
         __profcxx_list_construct2(this); 
       }
 
       list(const _Base& __x)
       : _Base(__x) 
-      {        
+      {
         __profcxx_list_construct(this); 
         __profcxx_list_construct2(this); 
       }
 
 #ifdef __GXX_EXPERIMENTAL_CXX0X__
-      list(list&& __x)
+      list(list&& __x) noexcept
       : _Base(std::move(__x))
-      { 
+      {
         __profcxx_list_construct(this); 
         __profcxx_list_construct2(this); 
       }
@@ -135,7 +135,7 @@ template<typename _Tp, typename _Allocator = std::allocator<_Tp> >
         : _Base(__l, __a) { }
 #endif
 
-      ~list()
+      ~list() _GLIBCXX_NOEXCEPT
       { 
         __profcxx_list_destruct(this); 
         __profcxx_list_destruct2(this); 
index 30f5f3aa67938e0fdac563d71e9fa713a3b2b48c..622bc575ad2d12812a9790d4f8fb03c990634f5d 100644 (file)
@@ -92,6 +92,7 @@ namespace __profile
 
 #ifdef __GXX_EXPERIMENTAL_CXX0X__
       map(map&& __x)
+      noexcept(is_nothrow_copy_constructible<_Compare>::value)
       : _Base(std::move(__x))
       { }
 
@@ -101,7 +102,7 @@ namespace __profile
       : _Base(__l, __c, __a) { }
 #endif
 
-      ~map()
+      ~map() _GLIBCXX_NOEXCEPT
       { __profcxx_map_to_unordered_map_destruct(this); }
 
       map&
index 5f1aba82e349bde2d78c1ad2e0f9d541f4a3cd33..547a221b3300bfb335cdffc38824b2d6c6ce0cf8 100644 (file)
@@ -82,6 +82,7 @@ namespace __profile
 
 #ifdef __GXX_EXPERIMENTAL_CXX0X__
       multimap(multimap&& __x)
+      noexcept(is_nothrow_copy_constructible<_Compare>::value)
       : _Base(std::move(__x))
       { }
 
@@ -91,7 +92,7 @@ namespace __profile
       : _Base(__l, __c, __a) { }
 #endif
 
-      ~multimap() { }
+      ~multimap() _GLIBCXX_NOEXCEPT { }
 
       multimap&
       operator=(const multimap& __x)
index d140623584515ffa8b129d4518fbea5e39607137..a5779383a56a943ed41621764c2ce8d8e6f79568 100644 (file)
@@ -82,6 +82,7 @@ namespace __profile
 
 #ifdef __GXX_EXPERIMENTAL_CXX0X__
       multiset(multiset&& __x)
+      noexcept(is_nothrow_copy_constructible<_Compare>::value)
       : _Base(std::move(__x))
       { }
 
@@ -91,7 +92,7 @@ namespace __profile
       : _Base(__l, __comp, __a) { }
 #endif
 
-      ~multiset() { }
+      ~multiset() _GLIBCXX_NOEXCEPT { }
 
       multiset&
       operator=(const multiset& __x)
index 8533a48c90dfc59dda3a7b1ac6d8681ac55ab836..47261e9160f1a9c81ef66dd0e65a4b48000cdcfd 100644 (file)
@@ -82,6 +82,7 @@ namespace __profile
 
 #ifdef __GXX_EXPERIMENTAL_CXX0X__
       set(set&& __x)
+      noexcept(is_nothrow_copy_constructible<_Compare>::value)
       : _Base(std::move(__x))
       { }
 
@@ -91,7 +92,7 @@ namespace __profile
       : _Base(__l, __comp, __a) { }
 #endif
 
-      ~set() { }
+      ~set() _GLIBCXX_NOEXCEPT { }
 
       set&
       operator=(const set& __x)
index 058bbd351320a6e1b9bd92aa29ec90b9b7899baa..5bbb7aea6d85beaa1b7be3cc71d35b5da5784f87 100644 (file)
@@ -104,6 +104,8 @@ namespace __profile
       }
 
       unordered_map(unordered_map&& __x)
+      noexcept(__and_<is_nothrow_copy_constructible<_Hash>,
+                     is_nothrow_copy_constructible<_Pred>>::value)
       : _Base(std::move(__x)) 
       {
         __profcxx_hashtable_construct(this, _Base::bucket_count());
@@ -142,7 +144,7 @@ namespace __profile
        return *this;
       }
 
-      ~unordered_map()
+      ~unordered_map() noexcept
       {
         __profcxx_hashtable_destruct(this, _Base::bucket_count(),
                                     _Base::size());
@@ -372,6 +374,8 @@ namespace __profile
       }
 
       unordered_multimap(unordered_multimap&& __x)
+      noexcept(__and_<is_nothrow_copy_constructible<_Hash>,
+                     is_nothrow_copy_constructible<_Pred>>::value)
       : _Base(std::move(__x))
       {
         __profcxx_hashtable_construct(this, _Base::bucket_count());
@@ -409,7 +413,7 @@ namespace __profile
        return *this;
       }
 
-      ~unordered_multimap()
+      ~unordered_multimap() noexcept
       {
         __profcxx_hashtable_destruct(this, _Base::bucket_count(), 
                                     _Base::size());
index 92c54c10f2ac9cd98cc8d7feb21e68bcbb0ed897..51b42db96335784493643f62c1da88803ca8b511 100644 (file)
@@ -103,6 +103,8 @@ namespace __profile
       }
 
       unordered_set(unordered_set&& __x)
+      noexcept(__and_<is_nothrow_copy_constructible<_Hash>,
+                     is_nothrow_copy_constructible<_Pred>>::value)
       : _Base(std::move(__x)) 
       { 
         __profcxx_hashtable_construct(this, _Base::bucket_count());
@@ -141,7 +143,7 @@ namespace __profile
        return *this;
       }
 
-      ~unordered_set()
+      ~unordered_set() noexcept
       {
         __profcxx_hashtable_destruct(this, _Base::bucket_count(), 
                                      _Base::size());
@@ -346,6 +348,8 @@ namespace __profile
       }
 
       unordered_multiset(unordered_multiset&& __x)
+      noexcept(__and_<is_nothrow_copy_constructible<_Hash>,
+                     is_nothrow_copy_constructible<_Pred>>::value)
       : _Base(std::move(__x))
       {
         __profcxx_hashtable_construct(this, _Base::bucket_count());
@@ -383,7 +387,7 @@ namespace __profile
        return *this;
       }
 
-      ~unordered_multiset()
+      ~unordered_multiset() noexcept
       {
         __profcxx_hashtable_destruct(this, _Base::bucket_count(), 
                                      _Base::size());
index 83a4a3b4c4a87d00adcf38a9f6af6295506ff81a..7a33e88be01ec9853a6825ed71ed69c8468d2096 100644 (file)
@@ -79,7 +79,7 @@ namespace __profile
       explicit
       vector(const _Allocator& __a = _Allocator())
       : _Base(__a)
-      { 
+      {
         __profcxx_vector_construct(this, this->capacity());
         __profcxx_vector_construct2(this);
       }
@@ -87,8 +87,8 @@ namespace __profile
 #ifdef __GXX_EXPERIMENTAL_CXX0X__
       explicit
       vector(size_type __n)
-      :  _Base(__n)
-      { 
+      : _Base(__n)
+      {
         __profcxx_vector_construct(this, this->capacity());
         __profcxx_vector_construct2(this);
       }
@@ -96,7 +96,7 @@ namespace __profile
       vector(size_type __n, const _Tp& __value,
             const _Allocator& __a = _Allocator())
       :  _Base(__n, __value, __a)
-      { 
+      {
         __profcxx_vector_construct(this, this->capacity());
         __profcxx_vector_construct2(this);
       }
@@ -104,8 +104,8 @@ namespace __profile
       explicit
       vector(size_type __n, const _Tp& __value = _Tp(),
             const _Allocator& __a = _Allocator())
-      :  _Base(__n, __value, __a)
-      { 
+      : _Base(__n, __value, __a)
+      {
         __profcxx_vector_construct(this, this->capacity());
         __profcxx_vector_construct2(this);
       }
@@ -115,14 +115,14 @@ namespace __profile
         vector(_InputIterator __first, _InputIterator __last,
               const _Allocator& __a = _Allocator())
        : _Base(__first, __last, __a)
-      { 
-        __profcxx_vector_construct(this, this->capacity());
-        __profcxx_vector_construct2(this);
-      }
+        {
+         __profcxx_vector_construct(this, this->capacity());
+         __profcxx_vector_construct2(this);
+       }
 
       vector(const vector& __x)
       : _Base(__x) 
-      { 
+      {
         __profcxx_vector_construct(this, this->capacity());
         __profcxx_vector_construct2(this);
       }
@@ -136,7 +136,7 @@ namespace __profile
       }
 
 #ifdef __GXX_EXPERIMENTAL_CXX0X__
-      vector(vector&& __x)
+      vector(vector&& __x) noexcept
       : _Base(std::move(__x))
       {
         __profcxx_vector_construct(this, this->capacity());
@@ -148,7 +148,7 @@ namespace __profile
       : _Base(__l, __a) { }
 #endif
 
-      ~vector()
+      ~vector() _GLIBCXX_NOEXCEPT
       {
         __profcxx_vector_destruct(this, this->capacity(), this->size());
         __profcxx_vector_destruct2(this);
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/noexcept_move_construct.cc b/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/noexcept_move_construct.cc
new file mode 100644 (file)
index 0000000..9d3d871
--- /dev/null
@@ -0,0 +1,27 @@
+// { dg-do compile }
+// { dg-options "-std=gnu++0x" }
+
+// 2011-06-01  Paolo Carlini  <paolo.carlini@oracle.com>
+//
+// Copyright (C) 2011 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 <string>
+
+typedef std::string stype;
+
+static_assert(std::is_nothrow_move_constructible<stype>::value, "Error");
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/noexcept_move_construct.cc b/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/noexcept_move_construct.cc
new file mode 100644 (file)
index 0000000..07cc8ce
--- /dev/null
@@ -0,0 +1,27 @@
+// { dg-do compile }
+// { dg-options "-std=gnu++0x" }
+
+// 2011-06-01  Paolo Carlini  <paolo.carlini@oracle.com>
+//
+// Copyright (C) 2011 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 <string>
+
+typedef std::wstring wstype;
+
+static_assert(std::is_nothrow_move_constructible<wstype>::value, "Error");
index ecd115e3aafe9acaeb9c61468e0d04a648452d23..1b0ececc05f641b78baeb90ead07d4bdbf2ba7b2 100644 (file)
@@ -18,7 +18,7 @@
 // <http://www.gnu.org/licenses/>.
 
 // { dg-do compile }
-// { dg-error "no matching" "" { target *-*-* } 1661 }
+// { dg-error "no matching" "" { target *-*-* } 1668 }
 // { dg-excess-errors "" }
 
 #include <deque>
index 4de01c826091e7fc961b5d63b76edc33d93b14d7..ebb9c3be348ba68435c5f37789dacd8a7edb815e 100644 (file)
@@ -18,7 +18,7 @@
 // <http://www.gnu.org/licenses/>.
 
 // { dg-do compile }
-// { dg-error "no matching" "" { target *-*-* } 1594 }
+// { dg-error "no matching" "" { target *-*-* } 1601 }
 // { dg-excess-errors "" }
 
 #include <deque>
index 78eeb8dbc6c44ab40c13dace96140e97b19ad61d..943bc637b1e204eb7cb75a1e4b9a5d73ad0fcdf3 100644 (file)
@@ -18,7 +18,7 @@
 // <http://www.gnu.org/licenses/>.
 
 // { dg-do compile }
-// { dg-error "no matching" "" { target *-*-* } 1594 }
+// { dg-error "no matching" "" { target *-*-* } 1601 }
 // { dg-excess-errors "" }
 
 #include <deque>
index f29152cb7c8e96bbf7bbe6525a1ebdc7b115890a..396122f5a89bb6afcfaa13100918961dbd45c632 100644 (file)
@@ -18,7 +18,7 @@
 // <http://www.gnu.org/licenses/>.
 
 // { dg-do compile }
-// { dg-error "no matching" "" { target *-*-* } 1745 }
+// { dg-error "no matching" "" { target *-*-* } 1752 }
 // { dg-excess-errors "" }
 
 #include <deque>
diff --git a/libstdc++-v3/testsuite/23_containers/forward_list/cons/noexcept_move_construct.cc b/libstdc++-v3/testsuite/23_containers/forward_list/cons/noexcept_move_construct.cc
new file mode 100644 (file)
index 0000000..36559b7
--- /dev/null
@@ -0,0 +1,27 @@
+// { dg-do compile }
+// { dg-options "-std=gnu++0x" }
+
+// 2011-06-01  Paolo Carlini  <paolo.carlini@oracle.com>
+//
+// Copyright (C) 2011 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 <forward_list>
+
+typedef std::forward_list<int> fltype;
+
+static_assert(std::is_nothrow_move_constructible<fltype>::value, "Error");
index e87fa60c3fa0bb7d086ce0e5cbcb279cff13506e..35ce47edf35472cf2dae12c6ece34d09212df35c 100644 (file)
@@ -1,6 +1,6 @@
 // { dg-do compile }
 // { dg-options "-std=gnu++0x" }
-// { dg-error "no matching" "" { target *-*-* } 1206 }
+// { dg-error "no matching" "" { target *-*-* } 1210 }
 // { dg-excess-errors "" }
 
 // Copyright (C) 2009, 2010 Free Software Foundation
index 5da159c1350675dbea58817056af09e6abcfbb0b..9c89fe793cf4cea5f035fb000cc9b2a668f338af 100644 (file)
@@ -1,6 +1,6 @@
 // { dg-do compile }
 // { dg-options "-std=gnu++0x" }
-// { dg-error "no matching" "" { target *-*-* } 1206 }
+// { dg-error "no matching" "" { target *-*-* } 1210 }
 // { dg-excess-errors "" }
 
 // Copyright (C) 2009, 2010, 2011 Free Software Foundation
index 785fe513642ee90b6c95ea404fdfaac05d433684..cb22c379a768a1a48423b488e3b86c5164595f75 100644 (file)
@@ -1,6 +1,6 @@
 // { dg-do compile }
 // { dg-options "-std=gnu++0x" }
-// { dg-error "no matching" "" { target *-*-* } 1206 }
+// { dg-error "no matching" "" { target *-*-* } 1210 }
 // { dg-excess-errors "" }
 
 // Copyright (C) 2009, 2010, 2011 Free Software Foundation
index aabc8b8f715774d6cca7ff1f2f0c0d011b659266..684b5013a91cb704750a26a20b2b7da26b2c946e 100644 (file)
@@ -1,6 +1,6 @@
 // { dg-do compile }
 // { dg-options "-std=gnu++0x" }
-// { dg-error "no matching" "" { target *-*-* } 1206 }
+// { dg-error "no matching" "" { target *-*-* } 1210 }
 // { dg-excess-errors "" }
 
 // Copyright (C) 2009, 2010, 2011 Free Software Foundation
diff --git a/libstdc++-v3/testsuite/23_containers/list/cons/noexcept_move_construct.cc b/libstdc++-v3/testsuite/23_containers/list/cons/noexcept_move_construct.cc
new file mode 100644 (file)
index 0000000..f54d4a1
--- /dev/null
@@ -0,0 +1,27 @@
+// { dg-do compile }
+// { dg-options "-std=gnu++0x" }
+
+// 2011-06-01  Paolo Carlini  <paolo.carlini@oracle.com>
+//
+// Copyright (C) 2011 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 <list>
+
+typedef std::list<int> ltype;
+
+static_assert(std::is_nothrow_move_constructible<ltype>::value, "Error");
index 96a14e4dade34dae2745f7ea8289f0c8b4a5570e..54473ee4231578c2fd6c3cda6acacf6761fea503 100644 (file)
@@ -18,7 +18,7 @@
 // <http://www.gnu.org/licenses/>.
 
 // { dg-do compile }
-// { dg-error "no matching" "" { target *-*-* } 1491 }
+// { dg-error "no matching" "" { target *-*-* } 1497 }
 // { dg-excess-errors "" }
 
 #include <list>
index cc10877fab48a884e9db41ccf24cd73432d85d7d..5f7b07f51dc339bea67857ce5f811451caa7f832 100644 (file)
@@ -18,7 +18,7 @@
 // <http://www.gnu.org/licenses/>.
 
 // { dg-do compile }
-// { dg-error "no matching" "" { target *-*-* } 1447 }
+// { dg-error "no matching" "" { target *-*-* } 1453 }
 // { dg-excess-errors "" }
 
 #include <list>
index acc64e4afd1c82296e7c4ded262698bb8aece27f..1bf19de6e1aa80d4a90000964836df07aa2924b0 100644 (file)
@@ -18,7 +18,7 @@
 // <http://www.gnu.org/licenses/>.
 
 // { dg-do compile }
-// { dg-error "no matching" "" { target *-*-* } 1447 }
+// { dg-error "no matching" "" { target *-*-* } 1453 }
 // { dg-excess-errors "" }
 
 #include <list>
index 8df0ac528c0d519e4013f3b468363a74aa2927d7..05dd2e732cc271b954a5f69eacf1868c76b819e9 100644 (file)
@@ -18,7 +18,7 @@
 // <http://www.gnu.org/licenses/>.
 
 // { dg-do compile }
-// { dg-error "no matching" "" { target *-*-* } 1447 }
+// { dg-error "no matching" "" { target *-*-* } 1453 }
 // { dg-excess-errors "" }
 
 #include <list>
diff --git a/libstdc++-v3/testsuite/23_containers/map/cons/noexcept_move_construct.cc b/libstdc++-v3/testsuite/23_containers/map/cons/noexcept_move_construct.cc
new file mode 100644 (file)
index 0000000..9ff36ef
--- /dev/null
@@ -0,0 +1,27 @@
+// { dg-do compile }
+// { dg-options "-std=gnu++0x" }
+
+// 2011-06-01  Paolo Carlini  <paolo.carlini@oracle.com>
+//
+// Copyright (C) 2011 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 <map>
+
+typedef std::map<int, int> mtype;
+
+static_assert(std::is_nothrow_move_constructible<mtype>::value, "Error");
diff --git a/libstdc++-v3/testsuite/23_containers/multimap/cons/noexcept_move_construct.cc b/libstdc++-v3/testsuite/23_containers/multimap/cons/noexcept_move_construct.cc
new file mode 100644 (file)
index 0000000..96546f5
--- /dev/null
@@ -0,0 +1,27 @@
+// { dg-do compile }
+// { dg-options "-std=gnu++0x" }
+
+// 2011-06-01  Paolo Carlini  <paolo.carlini@oracle.com>
+//
+// Copyright (C) 2011 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 <map>
+
+typedef std::multimap<int, int> mmtype;
+
+static_assert(std::is_nothrow_move_constructible<mmtype>::value, "Error");
diff --git a/libstdc++-v3/testsuite/23_containers/multiset/cons/noexcept_move_construct.cc b/libstdc++-v3/testsuite/23_containers/multiset/cons/noexcept_move_construct.cc
new file mode 100644 (file)
index 0000000..d200367
--- /dev/null
@@ -0,0 +1,27 @@
+// { dg-do compile }
+// { dg-options "-std=gnu++0x" }
+
+// 2011-06-01  Paolo Carlini  <paolo.carlini@oracle.com>
+//
+// Copyright (C) 2011 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 <set>
+
+typedef std::multiset<int> mstype;
+
+static_assert(std::is_nothrow_move_constructible<mstype>::value, "Error");
diff --git a/libstdc++-v3/testsuite/23_containers/set/cons/noexcept_move_construct.cc b/libstdc++-v3/testsuite/23_containers/set/cons/noexcept_move_construct.cc
new file mode 100644 (file)
index 0000000..ddee8ec
--- /dev/null
@@ -0,0 +1,27 @@
+// { dg-do compile }
+// { dg-options "-std=gnu++0x" }
+
+// 2011-06-01  Paolo Carlini  <paolo.carlini@oracle.com>
+//
+// Copyright (C) 2011 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 <set>
+
+typedef std::set<int> stype;
+
+static_assert(std::is_nothrow_move_constructible<stype>::value, "Error");
diff --git a/libstdc++-v3/testsuite/23_containers/unordered_map/cons/noexcept_move_construct.cc b/libstdc++-v3/testsuite/23_containers/unordered_map/cons/noexcept_move_construct.cc
new file mode 100644 (file)
index 0000000..cb21168
--- /dev/null
@@ -0,0 +1,27 @@
+// { dg-do compile }
+// { dg-options "-std=gnu++0x" }
+
+// 2011-06-01  Paolo Carlini  <paolo.carlini@oracle.com>
+//
+// Copyright (C) 2011 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 <unordered_map>
+
+typedef std::unordered_map<int, int> umtype;
+
+static_assert(std::is_nothrow_move_constructible<umtype>::value, "Error");
diff --git a/libstdc++-v3/testsuite/23_containers/unordered_multimap/cons/noexcept_move_construct.cc b/libstdc++-v3/testsuite/23_containers/unordered_multimap/cons/noexcept_move_construct.cc
new file mode 100644 (file)
index 0000000..45ccee0
--- /dev/null
@@ -0,0 +1,27 @@
+// { dg-do compile }
+// { dg-options "-std=gnu++0x" }
+
+// 2011-06-01  Paolo Carlini  <paolo.carlini@oracle.com>
+//
+// Copyright (C) 2011 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 <unordered_map>
+
+typedef std::unordered_multimap<int, int> ummtype;
+
+static_assert(std::is_nothrow_move_constructible<ummtype>::value, "Error");
diff --git a/libstdc++-v3/testsuite/23_containers/unordered_multiset/cons/noexcept_move_construct.cc b/libstdc++-v3/testsuite/23_containers/unordered_multiset/cons/noexcept_move_construct.cc
new file mode 100644 (file)
index 0000000..4a1ada8
--- /dev/null
@@ -0,0 +1,27 @@
+// { dg-do compile }
+// { dg-options "-std=gnu++0x" }
+
+// 2011-06-01  Paolo Carlini  <paolo.carlini@oracle.com>
+//
+// Copyright (C) 2011 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 <unordered_set>
+
+typedef std::unordered_multiset<int> umstype;
+
+static_assert(std::is_nothrow_move_constructible<umstype>::value, "Error");
diff --git a/libstdc++-v3/testsuite/23_containers/unordered_set/cons/noexcept_move_construct.cc b/libstdc++-v3/testsuite/23_containers/unordered_set/cons/noexcept_move_construct.cc
new file mode 100644 (file)
index 0000000..3e3ec73
--- /dev/null
@@ -0,0 +1,27 @@
+// { dg-do compile }
+// { dg-options "-std=gnu++0x" }
+
+// 2011-06-01  Paolo Carlini  <paolo.carlini@oracle.com>
+//
+// Copyright (C) 2011 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 <unordered_set>
+
+typedef std::unordered_set<int> ustype;
+
+static_assert(std::is_nothrow_move_constructible<ustype>::value, "Error");
diff --git a/libstdc++-v3/testsuite/23_containers/vector/bool/cons/noexcept_move_construct.cc b/libstdc++-v3/testsuite/23_containers/vector/bool/cons/noexcept_move_construct.cc
new file mode 100644 (file)
index 0000000..3fc7075
--- /dev/null
@@ -0,0 +1,27 @@
+// { dg-do compile }
+// { dg-options "-std=gnu++0x" }
+
+// 2011-06-01  Paolo Carlini  <paolo.carlini@oracle.com>
+//
+// Copyright (C) 2011 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 <vector>
+
+typedef std::vector<bool> vbtype;
+
+static_assert(std::is_nothrow_move_constructible<vbtype>::value, "Error");
diff --git a/libstdc++-v3/testsuite/23_containers/vector/cons/noexcept_move_construct.cc b/libstdc++-v3/testsuite/23_containers/vector/cons/noexcept_move_construct.cc
new file mode 100644 (file)
index 0000000..b73a575
--- /dev/null
@@ -0,0 +1,27 @@
+// { dg-do compile }
+// { dg-options "-std=gnu++0x" }
+
+// 2011-06-01  Paolo Carlini  <paolo.carlini@oracle.com>
+//
+// Copyright (C) 2011 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 <vector>
+
+typedef std::vector<int> vtype;
+
+static_assert(std::is_nothrow_move_constructible<vtype>::value, "Error");
index f13dd0163832c30d3afdaed0c249321b9832c86d..fcead6a4e9b3da1ccf1b215d8109c78e33d328db 100644 (file)
@@ -18,7 +18,7 @@
 // <http://www.gnu.org/licenses/>.
 
 // { dg-do compile }
-// { dg-error "no matching" "" { target *-*-* } 1150 }
+// { dg-error "no matching" "" { target *-*-* } 1157 }
 // { dg-excess-errors "" }
 
 #include <vector>
index 471d4589bf34a536a76a09a00f4471b55b3b6f56..acb195392bde7e4e2abaff61d11dfa5d15972e00 100644 (file)
@@ -18,7 +18,7 @@
 // <http://www.gnu.org/licenses/>.
 
 // { dg-do compile }
-// { dg-error "no matching" "" { target *-*-* } 1080 }
+// { dg-error "no matching" "" { target *-*-* } 1087 }
 // { dg-excess-errors "" }
 
 #include <vector>
index 8d1b72c63ee74261c0a07421a9de526b56bb852a..dd519da8ff39dcc75b06ece246935e5dd854b19b 100644 (file)
@@ -18,7 +18,7 @@
 // <http://www.gnu.org/licenses/>.
 
 // { dg-do compile }
-// { dg-error "no matching" "" { target *-*-* } 1080 }
+// { dg-error "no matching" "" { target *-*-* } 1087 }
 // { dg-excess-errors "" }
 
 #include <vector>
index 2f10c55036dcfd6140786e7dbf184531894b93e8..5fb204562408c85ed49be0060187de01b69f7859 100644 (file)
@@ -18,7 +18,7 @@
 // <http://www.gnu.org/licenses/>.
 
 // { dg-do compile }
-// { dg-error "no matching" "" { target *-*-* } 1191 }
+// { dg-error "no matching" "" { target *-*-* } 1198 }
 // { dg-excess-errors "" }
 
 #include <vector>
diff --git a/libstdc++-v3/testsuite/ext/vstring/cons/noexcept_move_construct.cc b/libstdc++-v3/testsuite/ext/vstring/cons/noexcept_move_construct.cc
new file mode 100644 (file)
index 0000000..3e592d7
--- /dev/null
@@ -0,0 +1,27 @@
+// { dg-do compile }
+// { dg-options "-std=gnu++0x" }
+
+// 2011-06-01  Paolo Carlini  <paolo.carlini@oracle.com>
+//
+// Copyright (C) 2011 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 <ext/vstring.h>
+
+typedef __gnu_cxx::__sso_string sstype;
+
+static_assert(std::is_nothrow_move_constructible<sstype>::value, "Error");