hashtable.h (_Hashtable<>::_Hashtable(_Hashtable&&)): Use std::move on the allocator, use noexcept.

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
This commit is contained in:
Paolo Carlini 2011-06-01 14:16:19 +00:00 committed by Paolo Carlini
parent 11026b5123
commit 6f59ea252b
68 changed files with 684 additions and 95 deletions

View 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> 2011-05-31 Paolo Carlini <paolo.carlini@oracle.com>
* include/bits/basic_string.h: Use noexcept per the FDIS (minus * include/bits/basic_string.h: Use noexcept per the FDIS (minus

View File

@ -551,8 +551,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
void void
swap(_Tp&, _Tp&) swap(_Tp&, _Tp&)
#ifdef __GXX_EXPERIMENTAL_CXX0X__ #ifdef __GXX_EXPERIMENTAL_CXX0X__
noexcept(is_nothrow_move_constructible<_Tp>::value noexcept(__and_<is_nothrow_move_constructible<_Tp>,
&& is_nothrow_move_assignable<_Tp>::value) is_nothrow_move_assignable<_Tp>>::value)
#endif #endif
; ;

View File

@ -530,7 +530,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
/** /**
* @brief Destroy the string instance. * @brief Destroy the string instance.
*/ */
~basic_string() ~basic_string() _GLIBCXX_NOEXCEPT
{ _M_rep()->_M_dispose(this->get_allocator()); } { _M_rep()->_M_dispose(this->get_allocator()); }
/** /**

View File

@ -290,6 +290,10 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
_Fwd_list_impl(const _Node_alloc_type& __a) _Fwd_list_impl(const _Node_alloc_type& __a)
: _Node_alloc_type(__a), _M_head() : _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; _Fwd_list_impl _M_impl;
@ -323,7 +327,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
} }
_Fwd_list_base(_Fwd_list_base&& __lst) _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; this->_M_impl._M_head._M_next = __lst._M_impl._M_head._M_next;
__lst._M_impl._M_head._M_next = 0; __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. The contents of @a list are a valid, but unspecified
* %forward_list. * %forward_list.
*/ */
forward_list(forward_list&& __list) forward_list(forward_list&& __list) noexcept
: _Base(std::move(__list)) { } : _Base(std::move(__list)) { }
/** /**
@ -542,7 +546,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
/** /**
* @brief The forward_list dtor. * @brief The forward_list dtor.
*/ */
~forward_list() ~forward_list() noexcept
{ } { }
/** /**

View File

@ -213,7 +213,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
_Hashtable(const _Hashtable&); _Hashtable(const _Hashtable&);
_Hashtable(_Hashtable&&); _Hashtable(_Hashtable&&)
noexcept(__and_<is_nothrow_copy_constructible<_Equal>,
is_nothrow_copy_constructible<_H1>>::value);
_Hashtable& _Hashtable&
operator=(const _Hashtable& __ht) operator=(const _Hashtable& __ht)
@ -233,7 +235,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
return *this; return *this;
} }
~_Hashtable(); ~_Hashtable() noexcept;
void swap(_Hashtable&); void swap(_Hashtable&);
@ -672,11 +674,13 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
_Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal, _Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal,
_H1, _H2, _Hash, _RehashPolicy, __chc, __cit, __uk>:: _H1, _H2, _Hash, _RehashPolicy, __chc, __cit, __uk>::
_Hashtable(_Hashtable&& __ht) _Hashtable(_Hashtable&& __ht)
noexcept(__and_<is_nothrow_copy_constructible<_Equal>,
is_nothrow_copy_constructible<_H1>>::value)
: __detail::_Rehash_base<_RehashPolicy, _Hashtable>(__ht), : __detail::_Rehash_base<_RehashPolicy, _Hashtable>(__ht),
__detail::_Hash_code_base<_Key, _Value, _ExtractKey, _Equal, __detail::_Hash_code_base<_Key, _Value, _ExtractKey, _Equal,
_H1, _H2, _Hash, __chc>(__ht), _H1, _H2, _Hash, __chc>(__ht),
__detail::_Map_base<_Key, _Value, _ExtractKey, __uk, _Hashtable>(__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_buckets(__ht._M_buckets),
_M_bucket_count(__ht._M_bucket_count), _M_bucket_count(__ht._M_bucket_count),
_M_begin_bucket_index(__ht._M_begin_bucket_index), _M_begin_bucket_index(__ht._M_begin_bucket_index),
@ -697,7 +701,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
bool __chc, bool __cit, bool __uk> bool __chc, bool __cit, bool __uk>
_Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal, _Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal,
_H1, _H2, _Hash, _RehashPolicy, __chc, __cit, __uk>:: _H1, _H2, _Hash, _RehashPolicy, __chc, __cit, __uk>::
~_Hashtable() ~_Hashtable() noexcept
{ {
clear(); clear();
_M_deallocate_buckets(_M_buckets, _M_bucket_count); _M_deallocate_buckets(_M_buckets, _M_bucket_count);

View File

@ -136,8 +136,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
inline void inline void
swap(_Tp& __a, _Tp& __b) swap(_Tp& __a, _Tp& __b)
#ifdef __GXX_EXPERIMENTAL_CXX0X__ #ifdef __GXX_EXPERIMENTAL_CXX0X__
noexcept(is_nothrow_move_constructible<_Tp>::value noexcept(__and_<is_nothrow_move_constructible<_Tp>,
&& is_nothrow_move_assignable<_Tp>::value) is_nothrow_move_assignable<_Tp>>::value)
#endif #endif
{ {
// concept requirements // concept requirements

View File

@ -392,6 +392,13 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
_Bvector_impl(const _Bit_alloc_type& __a) _Bvector_impl(const _Bit_alloc_type& __a)
: _Bit_alloc_type(__a), _M_start(), _M_finish(), _M_end_of_storage(0) : _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: public:
@ -416,8 +423,8 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
: _M_impl(__a) { } : _M_impl(__a) { }
#ifdef __GXX_EXPERIMENTAL_CXX0X__ #ifdef __GXX_EXPERIMENTAL_CXX0X__
_Bvector_base(_Bvector_base&& __x) _Bvector_base(_Bvector_base&& __x) noexcept
: _M_impl(__x._M_get_Bit_allocator()) : _M_impl(std::move(__x._M_get_Bit_allocator()))
{ {
this->_M_impl._M_start = __x._M_impl._M_start; this->_M_impl._M_start = __x._M_impl._M_start;
this->_M_impl._M_finish = __x._M_impl._M_finish; this->_M_impl._M_finish = __x._M_impl._M_finish;
@ -532,7 +539,7 @@ template<typename _Alloc>
} }
#ifdef __GXX_EXPERIMENTAL_CXX0X__ #ifdef __GXX_EXPERIMENTAL_CXX0X__
vector(vector&& __x) vector(vector&& __x) noexcept
: _Base(std::move(__x)) { } : _Base(std::move(__x)) { }
vector(initializer_list<bool> __l, vector(initializer_list<bool> __l,
@ -553,7 +560,7 @@ template<typename _Alloc>
_M_initialize_dispatch(__first, __last, _Integral()); _M_initialize_dispatch(__first, __last, _Integral());
} }
~vector() { } ~vector() _GLIBCXX_NOEXCEPT { }
vector& vector&
operator=(const vector& __x) operator=(const vector& __x)

View File

@ -465,7 +465,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
#ifdef __GXX_EXPERIMENTAL_CXX0X__ #ifdef __GXX_EXPERIMENTAL_CXX0X__
_Deque_base(_Deque_base&& __x) _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); _M_initialize_map(0);
if (__x._M_impl._M_map) 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), : _Tp_alloc_type(__a), _M_map(0), _M_map_size(0),
_M_start(), _M_finish() _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& _Tp_alloc_type&
@ -894,7 +901,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* themselves are pointers, the pointed-to memory is not touched in any * themselves are pointers, the pointed-to memory is not touched in any
* way. Managing the pointer is the user's responsibility. * way. Managing the pointer is the user's responsibility.
*/ */
~deque() ~deque() _GLIBCXX_NOEXCEPT
{ _M_destroy_data(begin(), end(), _M_get_Tp_allocator()); } { _M_destroy_data(begin(), end(), _M_get_Tp_allocator()); }
/** /**

View File

@ -318,6 +318,12 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
_List_impl(const _Node_alloc_type& __a) _List_impl(const _Node_alloc_type& __a)
: _Node_alloc_type(__a), _M_node() : _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; _List_impl _M_impl;
@ -359,7 +365,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
#ifdef __GXX_EXPERIMENTAL_CXX0X__ #ifdef __GXX_EXPERIMENTAL_CXX0X__
_List_base(_List_base&& __x) _List_base(_List_base&& __x)
: _M_impl(__x._M_get_Node_allocator()) : _M_impl(std::move(__x._M_get_Node_allocator()))
{ {
_M_init(); _M_init();
__detail::_List_node_base::swap(this->_M_impl._M_node, __detail::_List_node_base::swap(this->_M_impl._M_node,
@ -368,7 +374,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
#endif #endif
// This is what actually destroys the list. // This is what actually destroys the list.
~_List_base() ~_List_base() _GLIBCXX_NOEXCEPT
{ _M_clear(); } { _M_clear(); }
void void
@ -580,7 +586,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* The newly-created %list contains the exact contents of @a x. * The newly-created %list contains the exact contents of @a x.
* The contents of @a x are a valid, but unspecified %list. * The contents of @a x are a valid, but unspecified %list.
*/ */
list(list&& __x) list(list&& __x) noexcept
: _Base(std::move(__x)) { } : _Base(std::move(__x)) { }
/** /**

View File

@ -181,6 +181,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* The contents of @a x are a valid, but unspecified %map. * The contents of @a x are a valid, but unspecified %map.
*/ */
map(map&& __x) map(map&& __x)
noexcept(is_nothrow_copy_constructible<_Compare>::value)
: _M_t(std::move(__x._M_t)) { } : _M_t(std::move(__x._M_t)) { }
/** /**

View File

@ -179,6 +179,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* The contents of @a x are a valid, but unspecified %multimap. * The contents of @a x are a valid, but unspecified %multimap.
*/ */
multimap(multimap&& __x) multimap(multimap&& __x)
noexcept(is_nothrow_copy_constructible<_Compare>::value)
: _M_t(std::move(__x._M_t)) { } : _M_t(std::move(__x._M_t)) { }
/** /**

View File

@ -192,6 +192,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* The contents of @a x are a valid, but unspecified %multiset. * The contents of @a x are a valid, but unspecified %multiset.
*/ */
multiset(multiset&& __x) multiset(multiset&& __x)
noexcept(is_nothrow_copy_constructible<_Compare>::value)
: _M_t(std::move(__x._M_t)) { } : _M_t(std::move(__x._M_t)) { }
/** /**

View File

@ -199,6 +199,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* The contents of @a x are a valid, but unspecified %set. * The contents of @a x are a valid, but unspecified %set.
*/ */
set(set&& __x) set(set&& __x)
noexcept(is_nothrow_copy_constructible<_Compare>::value)
: _M_t(std::move(__x._M_t)) { } : _M_t(std::move(__x._M_t)) { }
/** /**

View File

@ -450,6 +450,13 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
_M_node_count(0) _M_node_count(0)
{ _M_initialize(); } { _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: private:
void void
_M_initialize() _M_initialize()
@ -635,7 +642,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
_Rb_tree(_Rb_tree&& __x); _Rb_tree(_Rb_tree&& __x);
#endif #endif
~_Rb_tree() ~_Rb_tree() _GLIBCXX_NOEXCEPT
{ _M_erase(_M_begin()); } { _M_erase(_M_begin()); }
_Rb_tree& _Rb_tree&
@ -900,7 +907,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
typename _Compare, typename _Alloc> typename _Compare, typename _Alloc>
_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::
_Rb_tree(_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>&& __x) _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) if (__x._M_root() != 0)
{ {

View File

@ -86,6 +86,13 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
_Vector_impl(_Tp_alloc_type const& __a) _Vector_impl(_Tp_alloc_type const& __a)
: _Tp_alloc_type(__a), _M_start(0), _M_finish(0), _M_end_of_storage(0) : _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: public:
@ -127,7 +134,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
#ifdef __GXX_EXPERIMENTAL_CXX0X__ #ifdef __GXX_EXPERIMENTAL_CXX0X__
_Vector_base(_Vector_base&& __x) _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_start = __x._M_impl._M_start;
this->_M_impl._M_finish = __x._M_impl._M_finish; 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 newly-created %vector contains the exact contents of @a x.
* The contents of @a x are a valid, but unspecified %vector. * The contents of @a x are a valid, but unspecified %vector.
*/ */
vector(vector&& __x) vector(vector&& __x) noexcept
: _Base(std::move(__x)) { } : _Base(std::move(__x)) { }
/** /**
@ -346,7 +353,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* not touched in any way. Managing the pointer is the user's * not touched in any way. Managing the pointer is the user's
* responsibility. * responsibility.
*/ */
~vector() ~vector() _GLIBCXX_NOEXCEPT
{ std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, { std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish,
_M_get_Tp_allocator()); } _M_get_Tp_allocator()); }

View File

@ -113,7 +113,7 @@ namespace __debug
: _Base(__l, __a), _Safe_base() { } : _Base(__l, __a), _Safe_base() { }
#endif #endif
~deque() { } ~deque() _GLIBCXX_NOEXCEPT { }
deque& deque&
operator=(const deque& __x) operator=(const deque& __x)

View File

@ -104,7 +104,7 @@ namespace __debug
: _Base(__list) : _Base(__list)
{ } { }
forward_list(forward_list&& __list) forward_list(forward_list&& __list) noexcept
: _Base(std::move(__list._M_base())) : _Base(std::move(__list._M_base()))
{ {
this->_M_swap(__list); this->_M_swap(__list);
@ -115,7 +115,7 @@ namespace __debug
: _Base(__il, __al) : _Base(__il, __al)
{ } { }
~forward_list() ~forward_list() noexcept
{ } { }
forward_list& forward_list&

View File

@ -106,7 +106,7 @@ namespace __debug
: _Base(__x), _Safe_base() { } : _Base(__x), _Safe_base() { }
#ifdef __GXX_EXPERIMENTAL_CXX0X__ #ifdef __GXX_EXPERIMENTAL_CXX0X__
list(list&& __x) list(list&& __x) noexcept
: _Base(std::move(__x)), _Safe_base() : _Base(std::move(__x)), _Safe_base()
{ this->_M_swap(__x); } { this->_M_swap(__x); }
@ -115,7 +115,7 @@ namespace __debug
: _Base(__l, __a), _Safe_base() { } : _Base(__l, __a), _Safe_base() { }
#endif #endif
~list() { } ~list() _GLIBCXX_NOEXCEPT { }
list& list&
operator=(const list& __x) operator=(const list& __x)

View File

@ -95,6 +95,7 @@ namespace __debug
#ifdef __GXX_EXPERIMENTAL_CXX0X__ #ifdef __GXX_EXPERIMENTAL_CXX0X__
map(map&& __x) map(map&& __x)
noexcept(is_nothrow_copy_constructible<_Compare>::value)
: _Base(std::move(__x)), _Safe_base() : _Base(std::move(__x)), _Safe_base()
{ this->_M_swap(__x); } { this->_M_swap(__x); }
@ -104,7 +105,7 @@ namespace __debug
: _Base(__l, __c, __a), _Safe_base() { } : _Base(__l, __c, __a), _Safe_base() { }
#endif #endif
~map() { } ~map() _GLIBCXX_NOEXCEPT { }
map& map&
operator=(const map& __x) operator=(const map& __x)

View File

@ -96,6 +96,7 @@ namespace __debug
#ifdef __GXX_EXPERIMENTAL_CXX0X__ #ifdef __GXX_EXPERIMENTAL_CXX0X__
multimap(multimap&& __x) multimap(multimap&& __x)
noexcept(is_nothrow_copy_constructible<_Compare>::value)
: _Base(std::move(__x)), _Safe_base() : _Base(std::move(__x)), _Safe_base()
{ this->_M_swap(__x); } { this->_M_swap(__x); }
@ -105,7 +106,7 @@ namespace __debug
: _Base(__l, __c, __a), _Safe_base() { } : _Base(__l, __c, __a), _Safe_base() { }
#endif #endif
~multimap() { } ~multimap() _GLIBCXX_NOEXCEPT { }
multimap& multimap&
operator=(const multimap& __x) operator=(const multimap& __x)

View File

@ -95,6 +95,7 @@ namespace __debug
#ifdef __GXX_EXPERIMENTAL_CXX0X__ #ifdef __GXX_EXPERIMENTAL_CXX0X__
multiset(multiset&& __x) multiset(multiset&& __x)
noexcept(is_nothrow_copy_constructible<_Compare>::value)
: _Base(std::move(__x)), _Safe_base() : _Base(std::move(__x)), _Safe_base()
{ this->_M_swap(__x); } { this->_M_swap(__x); }
@ -104,7 +105,7 @@ namespace __debug
: _Base(__l, __comp, __a), _Safe_base() { } : _Base(__l, __comp, __a), _Safe_base() { }
#endif #endif
~multiset() { } ~multiset() _GLIBCXX_NOEXCEPT { }
multiset& multiset&
operator=(const multiset& __x) operator=(const multiset& __x)

View File

@ -1,6 +1,6 @@
// Debugging set implementation -*- C++ -*- // 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. // Free Software Foundation, Inc.
// //
// This file is part of the GNU ISO C++ Library. This library is free // This file is part of the GNU ISO C++ Library. This library is free
@ -95,6 +95,7 @@ namespace __debug
#ifdef __GXX_EXPERIMENTAL_CXX0X__ #ifdef __GXX_EXPERIMENTAL_CXX0X__
set(set&& __x) set(set&& __x)
noexcept(is_nothrow_copy_constructible<_Compare>::value)
: _Base(std::move(__x)), _Safe_base() : _Base(std::move(__x)), _Safe_base()
{ this->_M_swap(__x); } { this->_M_swap(__x); }
@ -104,7 +105,7 @@ namespace __debug
: _Base(__l, __comp, __a), _Safe_base() { } : _Base(__l, __comp, __a), _Safe_base() { }
#endif #endif
~set() { } ~set() _GLIBCXX_NOEXCEPT { }
set& set&
operator=(const set& __x) operator=(const set& __x)

View File

@ -124,7 +124,7 @@ namespace __gnu_debug
{ } { }
#endif // __GXX_EXPERIMENTAL_CXX0X__ #endif // __GXX_EXPERIMENTAL_CXX0X__
~basic_string() { } ~basic_string() _GLIBCXX_NOEXCEPT { }
basic_string& basic_string&
operator=(const basic_string& __str) operator=(const basic_string& __str)

View File

@ -1,6 +1,6 @@
// Debugging unordered_map/unordered_multimap implementation -*- C++ -*- // 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. // Free Software Foundation, Inc.
// //
// This file is part of the GNU ISO C++ Library. This library is free // This file is part of the GNU ISO C++ Library. This library is free
@ -98,6 +98,8 @@ namespace __debug
: _Base(__x), _Safe_base() { } : _Base(__x), _Safe_base() { }
unordered_map(unordered_map&& __x) unordered_map(unordered_map&& __x)
noexcept(__and_<is_nothrow_copy_constructible<_Hash>,
is_nothrow_copy_constructible<_Pred>>::value)
: _Base(std::move(__x)), _Safe_base() { } : _Base(std::move(__x)), _Safe_base() { }
unordered_map(initializer_list<value_type> __l, unordered_map(initializer_list<value_type> __l,
@ -107,6 +109,8 @@ namespace __debug
const allocator_type& __a = allocator_type()) const allocator_type& __a = allocator_type())
: _Base(__l, __n, __hf, __eql, __a), _Safe_base() { } : _Base(__l, __n, __hf, __eql, __a), _Safe_base() { }
~unordered_map() noexcept { }
unordered_map& unordered_map&
operator=(const unordered_map& __x) operator=(const unordered_map& __x)
{ {
@ -386,6 +390,8 @@ namespace __debug
: _Base(__x), _Safe_base() { } : _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() { } : _Base(std::move(__x)), _Safe_base() { }
unordered_multimap(initializer_list<value_type> __l, unordered_multimap(initializer_list<value_type> __l,
@ -395,6 +401,8 @@ namespace __debug
const allocator_type& __a = allocator_type()) const allocator_type& __a = allocator_type())
: _Base(__l, __n, __hf, __eql, __a), _Safe_base() { } : _Base(__l, __n, __hf, __eql, __a), _Safe_base() { }
~unordered_multimap() noexcept { }
unordered_multimap& unordered_multimap&
operator=(const unordered_multimap& __x) operator=(const unordered_multimap& __x)
{ {

View File

@ -98,6 +98,8 @@ namespace __debug
: _Base(__x), _Safe_base() { } : _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() { } : _Base(std::move(__x)), _Safe_base() { }
unordered_set(initializer_list<value_type> __l, unordered_set(initializer_list<value_type> __l,
@ -107,6 +109,8 @@ namespace __debug
const allocator_type& __a = allocator_type()) const allocator_type& __a = allocator_type())
: _Base(__l, __n, __hf, __eql, __a), _Safe_base() { } : _Base(__l, __n, __hf, __eql, __a), _Safe_base() { }
~unordered_set() noexcept { }
unordered_set& unordered_set&
operator=(const unordered_set& __x) operator=(const unordered_set& __x)
{ {
@ -375,6 +379,8 @@ namespace __debug
: _Base(__x), _Safe_base() { } : _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() { } : _Base(std::move(__x)), _Safe_base() { }
unordered_multiset(initializer_list<value_type> __l, unordered_multiset(initializer_list<value_type> __l,
@ -384,6 +390,8 @@ namespace __debug
const allocator_type& __a = allocator_type()) const allocator_type& __a = allocator_type())
: _Base(__l, __n, __hf, __eql, __a), _Safe_base() { } : _Base(__l, __n, __hf, __eql, __a), _Safe_base() { }
~unordered_multiset() noexcept { }
unordered_multiset& unordered_multiset&
operator=(const unordered_multiset& __x) operator=(const unordered_multiset& __x)
{ {

View File

@ -109,7 +109,7 @@ namespace __debug
: _Base(__x), _Safe_base(), _M_guaranteed_capacity(__x.size()) { } : _Base(__x), _Safe_base(), _M_guaranteed_capacity(__x.size()) { }
#ifdef __GXX_EXPERIMENTAL_CXX0X__ #ifdef __GXX_EXPERIMENTAL_CXX0X__
vector(vector&& __x) vector(vector&& __x) noexcept
: _Base(std::move(__x)), _Safe_base(), : _Base(std::move(__x)), _Safe_base(),
_M_guaranteed_capacity(this->size()) _M_guaranteed_capacity(this->size())
{ {
@ -123,7 +123,7 @@ namespace __debug
_M_guaranteed_capacity(__l.size()) { } _M_guaranteed_capacity(__l.size()) { }
#endif #endif
~vector() { } ~vector() _GLIBCXX_NOEXCEPT { }
vector& vector&
operator=(const vector& __x) operator=(const vector& __x)

View File

@ -243,7 +243,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
/** /**
* @brief Destroy the string instance. * @brief Destroy the string instance.
*/ */
~__versa_string() { } ~__versa_string() _GLIBCXX_NOEXCEPT { }
/** /**
* @brief Assign the value of @a str to this string. * @brief Assign the value of @a str to this string.

View File

@ -101,7 +101,7 @@ namespace __profile
: _Base(__l, __a) { } : _Base(__l, __a) { }
#endif #endif
~deque() { } ~deque() _GLIBCXX_NOEXCEPT { }
deque& deque&
operator=(const deque& __x) operator=(const deque& __x)

View File

@ -83,7 +83,7 @@ namespace __profile
: _Base(__list) : _Base(__list)
{ } { }
forward_list(forward_list&& __list) forward_list(forward_list&& __list) noexcept
: _Base(std::move(__list)) { } : _Base(std::move(__list)) { }
forward_list(std::initializer_list<_Tp> __il, forward_list(std::initializer_list<_Tp> __il,
@ -91,7 +91,7 @@ namespace __profile
: _Base(__il, __al) : _Base(__il, __al)
{ } { }
~forward_list() ~forward_list() noexcept
{ } { }
forward_list& forward_list&

View File

@ -123,7 +123,7 @@ template<typename _Tp, typename _Allocator = std::allocator<_Tp> >
} }
#ifdef __GXX_EXPERIMENTAL_CXX0X__ #ifdef __GXX_EXPERIMENTAL_CXX0X__
list(list&& __x) list(list&& __x) noexcept
: _Base(std::move(__x)) : _Base(std::move(__x))
{ {
__profcxx_list_construct(this); __profcxx_list_construct(this);
@ -135,7 +135,7 @@ template<typename _Tp, typename _Allocator = std::allocator<_Tp> >
: _Base(__l, __a) { } : _Base(__l, __a) { }
#endif #endif
~list() ~list() _GLIBCXX_NOEXCEPT
{ {
__profcxx_list_destruct(this); __profcxx_list_destruct(this);
__profcxx_list_destruct2(this); __profcxx_list_destruct2(this);

View File

@ -92,6 +92,7 @@ namespace __profile
#ifdef __GXX_EXPERIMENTAL_CXX0X__ #ifdef __GXX_EXPERIMENTAL_CXX0X__
map(map&& __x) map(map&& __x)
noexcept(is_nothrow_copy_constructible<_Compare>::value)
: _Base(std::move(__x)) : _Base(std::move(__x))
{ } { }
@ -101,7 +102,7 @@ namespace __profile
: _Base(__l, __c, __a) { } : _Base(__l, __c, __a) { }
#endif #endif
~map() ~map() _GLIBCXX_NOEXCEPT
{ __profcxx_map_to_unordered_map_destruct(this); } { __profcxx_map_to_unordered_map_destruct(this); }
map& map&

View File

@ -82,6 +82,7 @@ namespace __profile
#ifdef __GXX_EXPERIMENTAL_CXX0X__ #ifdef __GXX_EXPERIMENTAL_CXX0X__
multimap(multimap&& __x) multimap(multimap&& __x)
noexcept(is_nothrow_copy_constructible<_Compare>::value)
: _Base(std::move(__x)) : _Base(std::move(__x))
{ } { }
@ -91,7 +92,7 @@ namespace __profile
: _Base(__l, __c, __a) { } : _Base(__l, __c, __a) { }
#endif #endif
~multimap() { } ~multimap() _GLIBCXX_NOEXCEPT { }
multimap& multimap&
operator=(const multimap& __x) operator=(const multimap& __x)

View File

@ -82,6 +82,7 @@ namespace __profile
#ifdef __GXX_EXPERIMENTAL_CXX0X__ #ifdef __GXX_EXPERIMENTAL_CXX0X__
multiset(multiset&& __x) multiset(multiset&& __x)
noexcept(is_nothrow_copy_constructible<_Compare>::value)
: _Base(std::move(__x)) : _Base(std::move(__x))
{ } { }
@ -91,7 +92,7 @@ namespace __profile
: _Base(__l, __comp, __a) { } : _Base(__l, __comp, __a) { }
#endif #endif
~multiset() { } ~multiset() _GLIBCXX_NOEXCEPT { }
multiset& multiset&
operator=(const multiset& __x) operator=(const multiset& __x)

View File

@ -82,6 +82,7 @@ namespace __profile
#ifdef __GXX_EXPERIMENTAL_CXX0X__ #ifdef __GXX_EXPERIMENTAL_CXX0X__
set(set&& __x) set(set&& __x)
noexcept(is_nothrow_copy_constructible<_Compare>::value)
: _Base(std::move(__x)) : _Base(std::move(__x))
{ } { }
@ -91,7 +92,7 @@ namespace __profile
: _Base(__l, __comp, __a) { } : _Base(__l, __comp, __a) { }
#endif #endif
~set() { } ~set() _GLIBCXX_NOEXCEPT { }
set& set&
operator=(const set& __x) operator=(const set& __x)

View File

@ -104,6 +104,8 @@ namespace __profile
} }
unordered_map(unordered_map&& __x) unordered_map(unordered_map&& __x)
noexcept(__and_<is_nothrow_copy_constructible<_Hash>,
is_nothrow_copy_constructible<_Pred>>::value)
: _Base(std::move(__x)) : _Base(std::move(__x))
{ {
__profcxx_hashtable_construct(this, _Base::bucket_count()); __profcxx_hashtable_construct(this, _Base::bucket_count());
@ -142,7 +144,7 @@ namespace __profile
return *this; return *this;
} }
~unordered_map() ~unordered_map() noexcept
{ {
__profcxx_hashtable_destruct(this, _Base::bucket_count(), __profcxx_hashtable_destruct(this, _Base::bucket_count(),
_Base::size()); _Base::size());
@ -372,6 +374,8 @@ namespace __profile
} }
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)) : _Base(std::move(__x))
{ {
__profcxx_hashtable_construct(this, _Base::bucket_count()); __profcxx_hashtable_construct(this, _Base::bucket_count());
@ -409,7 +413,7 @@ namespace __profile
return *this; return *this;
} }
~unordered_multimap() ~unordered_multimap() noexcept
{ {
__profcxx_hashtable_destruct(this, _Base::bucket_count(), __profcxx_hashtable_destruct(this, _Base::bucket_count(),
_Base::size()); _Base::size());

View File

@ -103,6 +103,8 @@ namespace __profile
} }
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)) : _Base(std::move(__x))
{ {
__profcxx_hashtable_construct(this, _Base::bucket_count()); __profcxx_hashtable_construct(this, _Base::bucket_count());
@ -141,7 +143,7 @@ namespace __profile
return *this; return *this;
} }
~unordered_set() ~unordered_set() noexcept
{ {
__profcxx_hashtable_destruct(this, _Base::bucket_count(), __profcxx_hashtable_destruct(this, _Base::bucket_count(),
_Base::size()); _Base::size());
@ -346,6 +348,8 @@ namespace __profile
} }
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)) : _Base(std::move(__x))
{ {
__profcxx_hashtable_construct(this, _Base::bucket_count()); __profcxx_hashtable_construct(this, _Base::bucket_count());
@ -383,7 +387,7 @@ namespace __profile
return *this; return *this;
} }
~unordered_multiset() ~unordered_multiset() noexcept
{ {
__profcxx_hashtable_destruct(this, _Base::bucket_count(), __profcxx_hashtable_destruct(this, _Base::bucket_count(),
_Base::size()); _Base::size());

View File

@ -136,7 +136,7 @@ namespace __profile
} }
#ifdef __GXX_EXPERIMENTAL_CXX0X__ #ifdef __GXX_EXPERIMENTAL_CXX0X__
vector(vector&& __x) vector(vector&& __x) noexcept
: _Base(std::move(__x)) : _Base(std::move(__x))
{ {
__profcxx_vector_construct(this, this->capacity()); __profcxx_vector_construct(this, this->capacity());
@ -148,7 +148,7 @@ namespace __profile
: _Base(__l, __a) { } : _Base(__l, __a) { }
#endif #endif
~vector() ~vector() _GLIBCXX_NOEXCEPT
{ {
__profcxx_vector_destruct(this, this->capacity(), this->size()); __profcxx_vector_destruct(this, this->capacity(), this->size());
__profcxx_vector_destruct2(this); __profcxx_vector_destruct2(this);

View File

@ -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");

View File

@ -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");

View File

@ -18,7 +18,7 @@
// <http://www.gnu.org/licenses/>. // <http://www.gnu.org/licenses/>.
// { dg-do compile } // { dg-do compile }
// { dg-error "no matching" "" { target *-*-* } 1661 } // { dg-error "no matching" "" { target *-*-* } 1668 }
// { dg-excess-errors "" } // { dg-excess-errors "" }
#include <deque> #include <deque>

View File

@ -18,7 +18,7 @@
// <http://www.gnu.org/licenses/>. // <http://www.gnu.org/licenses/>.
// { dg-do compile } // { dg-do compile }
// { dg-error "no matching" "" { target *-*-* } 1594 } // { dg-error "no matching" "" { target *-*-* } 1601 }
// { dg-excess-errors "" } // { dg-excess-errors "" }
#include <deque> #include <deque>

View File

@ -18,7 +18,7 @@
// <http://www.gnu.org/licenses/>. // <http://www.gnu.org/licenses/>.
// { dg-do compile } // { dg-do compile }
// { dg-error "no matching" "" { target *-*-* } 1594 } // { dg-error "no matching" "" { target *-*-* } 1601 }
// { dg-excess-errors "" } // { dg-excess-errors "" }
#include <deque> #include <deque>

View File

@ -18,7 +18,7 @@
// <http://www.gnu.org/licenses/>. // <http://www.gnu.org/licenses/>.
// { dg-do compile } // { dg-do compile }
// { dg-error "no matching" "" { target *-*-* } 1745 } // { dg-error "no matching" "" { target *-*-* } 1752 }
// { dg-excess-errors "" } // { dg-excess-errors "" }
#include <deque> #include <deque>

View File

@ -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");

View File

@ -1,6 +1,6 @@
// { dg-do compile } // { dg-do compile }
// { dg-options "-std=gnu++0x" } // { dg-options "-std=gnu++0x" }
// { dg-error "no matching" "" { target *-*-* } 1206 } // { dg-error "no matching" "" { target *-*-* } 1210 }
// { dg-excess-errors "" } // { dg-excess-errors "" }
// Copyright (C) 2009, 2010 Free Software Foundation // Copyright (C) 2009, 2010 Free Software Foundation

View File

@ -1,6 +1,6 @@
// { dg-do compile } // { dg-do compile }
// { dg-options "-std=gnu++0x" } // { dg-options "-std=gnu++0x" }
// { dg-error "no matching" "" { target *-*-* } 1206 } // { dg-error "no matching" "" { target *-*-* } 1210 }
// { dg-excess-errors "" } // { dg-excess-errors "" }
// Copyright (C) 2009, 2010, 2011 Free Software Foundation // Copyright (C) 2009, 2010, 2011 Free Software Foundation

View File

@ -1,6 +1,6 @@
// { dg-do compile } // { dg-do compile }
// { dg-options "-std=gnu++0x" } // { dg-options "-std=gnu++0x" }
// { dg-error "no matching" "" { target *-*-* } 1206 } // { dg-error "no matching" "" { target *-*-* } 1210 }
// { dg-excess-errors "" } // { dg-excess-errors "" }
// Copyright (C) 2009, 2010, 2011 Free Software Foundation // Copyright (C) 2009, 2010, 2011 Free Software Foundation

View File

@ -1,6 +1,6 @@
// { dg-do compile } // { dg-do compile }
// { dg-options "-std=gnu++0x" } // { dg-options "-std=gnu++0x" }
// { dg-error "no matching" "" { target *-*-* } 1206 } // { dg-error "no matching" "" { target *-*-* } 1210 }
// { dg-excess-errors "" } // { dg-excess-errors "" }
// Copyright (C) 2009, 2010, 2011 Free Software Foundation // Copyright (C) 2009, 2010, 2011 Free Software Foundation

View File

@ -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");

View File

@ -18,7 +18,7 @@
// <http://www.gnu.org/licenses/>. // <http://www.gnu.org/licenses/>.
// { dg-do compile } // { dg-do compile }
// { dg-error "no matching" "" { target *-*-* } 1491 } // { dg-error "no matching" "" { target *-*-* } 1497 }
// { dg-excess-errors "" } // { dg-excess-errors "" }
#include <list> #include <list>

View File

@ -18,7 +18,7 @@
// <http://www.gnu.org/licenses/>. // <http://www.gnu.org/licenses/>.
// { dg-do compile } // { dg-do compile }
// { dg-error "no matching" "" { target *-*-* } 1447 } // { dg-error "no matching" "" { target *-*-* } 1453 }
// { dg-excess-errors "" } // { dg-excess-errors "" }
#include <list> #include <list>

View File

@ -18,7 +18,7 @@
// <http://www.gnu.org/licenses/>. // <http://www.gnu.org/licenses/>.
// { dg-do compile } // { dg-do compile }
// { dg-error "no matching" "" { target *-*-* } 1447 } // { dg-error "no matching" "" { target *-*-* } 1453 }
// { dg-excess-errors "" } // { dg-excess-errors "" }
#include <list> #include <list>

View File

@ -18,7 +18,7 @@
// <http://www.gnu.org/licenses/>. // <http://www.gnu.org/licenses/>.
// { dg-do compile } // { dg-do compile }
// { dg-error "no matching" "" { target *-*-* } 1447 } // { dg-error "no matching" "" { target *-*-* } 1453 }
// { dg-excess-errors "" } // { dg-excess-errors "" }
#include <list> #include <list>

View File

@ -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");

View File

@ -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");

View File

@ -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");

View File

@ -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");

View File

@ -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");

View File

@ -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");

View File

@ -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");

View File

@ -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");

View File

@ -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");

View File

@ -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");

View File

@ -18,7 +18,7 @@
// <http://www.gnu.org/licenses/>. // <http://www.gnu.org/licenses/>.
// { dg-do compile } // { dg-do compile }
// { dg-error "no matching" "" { target *-*-* } 1150 } // { dg-error "no matching" "" { target *-*-* } 1157 }
// { dg-excess-errors "" } // { dg-excess-errors "" }
#include <vector> #include <vector>

View File

@ -18,7 +18,7 @@
// <http://www.gnu.org/licenses/>. // <http://www.gnu.org/licenses/>.
// { dg-do compile } // { dg-do compile }
// { dg-error "no matching" "" { target *-*-* } 1080 } // { dg-error "no matching" "" { target *-*-* } 1087 }
// { dg-excess-errors "" } // { dg-excess-errors "" }
#include <vector> #include <vector>

View File

@ -18,7 +18,7 @@
// <http://www.gnu.org/licenses/>. // <http://www.gnu.org/licenses/>.
// { dg-do compile } // { dg-do compile }
// { dg-error "no matching" "" { target *-*-* } 1080 } // { dg-error "no matching" "" { target *-*-* } 1087 }
// { dg-excess-errors "" } // { dg-excess-errors "" }
#include <vector> #include <vector>

View File

@ -18,7 +18,7 @@
// <http://www.gnu.org/licenses/>. // <http://www.gnu.org/licenses/>.
// { dg-do compile } // { dg-do compile }
// { dg-error "no matching" "" { target *-*-* } 1191 } // { dg-error "no matching" "" { target *-*-* } 1198 }
// { dg-excess-errors "" } // { dg-excess-errors "" }
#include <vector> #include <vector>

View File

@ -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");