summaryrefslogtreecommitdiff
path: root/libstdc++-v3/include/bits
diff options
context:
space:
mode:
Diffstat (limited to 'libstdc++-v3/include/bits')
-rw-r--r--libstdc++-v3/include/bits/algorithmfwd.h4
-rw-r--r--libstdc++-v3/include/bits/basic_string.h2
-rw-r--r--libstdc++-v3/include/bits/forward_list.h10
-rw-r--r--libstdc++-v3/include/bits/hashtable.h14
-rw-r--r--libstdc++-v3/include/bits/move.h4
-rw-r--r--libstdc++-v3/include/bits/stl_bvector.h15
-rw-r--r--libstdc++-v3/include/bits/stl_deque.h11
-rw-r--r--libstdc++-v3/include/bits/stl_list.h12
-rw-r--r--libstdc++-v3/include/bits/stl_map.h1
-rw-r--r--libstdc++-v3/include/bits/stl_multimap.h1
-rw-r--r--libstdc++-v3/include/bits/stl_multiset.h1
-rw-r--r--libstdc++-v3/include/bits/stl_set.h1
-rw-r--r--libstdc++-v3/include/bits/stl_tree.h12
-rw-r--r--libstdc++-v3/include/bits/stl_vector.h13
14 files changed, 74 insertions, 27 deletions
diff --git a/libstdc++-v3/include/bits/algorithmfwd.h b/libstdc++-v3/include/bits/algorithmfwd.h
index fe3b68f6a25..bb7ca250333 100644
--- a/libstdc++-v3/include/bits/algorithmfwd.h
+++ b/libstdc++-v3/include/bits/algorithmfwd.h
@@ -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
;
diff --git a/libstdc++-v3/include/bits/basic_string.h b/libstdc++-v3/include/bits/basic_string.h
index f82cfbb85b2..9279a38cf4c 100644
--- a/libstdc++-v3/include/bits/basic_string.h
+++ b/libstdc++-v3/include/bits/basic_string.h
@@ -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()); }
/**
diff --git a/libstdc++-v3/include/bits/forward_list.h b/libstdc++-v3/include/bits/forward_list.h
index 1e242f3f760..df96c88cb99 100644
--- a/libstdc++-v3/include/bits/forward_list.h
+++ b/libstdc++-v3/include/bits/forward_list.h
@@ -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
{ }
/**
diff --git a/libstdc++-v3/include/bits/hashtable.h b/libstdc++-v3/include/bits/hashtable.h
index fd6bc32b0d8..d72c78bbdf2 100644
--- a/libstdc++-v3/include/bits/hashtable.h
+++ b/libstdc++-v3/include/bits/hashtable.h
@@ -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);
diff --git a/libstdc++-v3/include/bits/move.h b/libstdc++-v3/include/bits/move.h
index 963dd4c655d..ca7686eb162 100644
--- a/libstdc++-v3/include/bits/move.h
+++ b/libstdc++-v3/include/bits/move.h
@@ -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
diff --git a/libstdc++-v3/include/bits/stl_bvector.h b/libstdc++-v3/include/bits/stl_bvector.h
index 47156418509..edf662987cb 100644
--- a/libstdc++-v3/include/bits/stl_bvector.h
+++ b/libstdc++-v3/include/bits/stl_bvector.h
@@ -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)
diff --git a/libstdc++-v3/include/bits/stl_deque.h b/libstdc++-v3/include/bits/stl_deque.h
index 209287b56fc..7ddfbc5ac16 100644
--- a/libstdc++-v3/include/bits/stl_deque.h
+++ b/libstdc++-v3/include/bits/stl_deque.h
@@ -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()); }
/**
diff --git a/libstdc++-v3/include/bits/stl_list.h b/libstdc++-v3/include/bits/stl_list.h
index 5144bb67e7b..96995994185 100644
--- a/libstdc++-v3/include/bits/stl_list.h
+++ b/libstdc++-v3/include/bits/stl_list.h
@@ -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)) { }
/**
diff --git a/libstdc++-v3/include/bits/stl_map.h b/libstdc++-v3/include/bits/stl_map.h
index 49341c998de..3ca683791d8 100644
--- a/libstdc++-v3/include/bits/stl_map.h
+++ b/libstdc++-v3/include/bits/stl_map.h
@@ -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)) { }
/**
diff --git a/libstdc++-v3/include/bits/stl_multimap.h b/libstdc++-v3/include/bits/stl_multimap.h
index bc677262a32..58811317228 100644
--- a/libstdc++-v3/include/bits/stl_multimap.h
+++ b/libstdc++-v3/include/bits/stl_multimap.h
@@ -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)) { }
/**
diff --git a/libstdc++-v3/include/bits/stl_multiset.h b/libstdc++-v3/include/bits/stl_multiset.h
index c3e686adeb1..d5d94ebe7c9 100644
--- a/libstdc++-v3/include/bits/stl_multiset.h
+++ b/libstdc++-v3/include/bits/stl_multiset.h
@@ -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)) { }
/**
diff --git a/libstdc++-v3/include/bits/stl_set.h b/libstdc++-v3/include/bits/stl_set.h
index aa89a8a21cb..9676d909f69 100644
--- a/libstdc++-v3/include/bits/stl_set.h
+++ b/libstdc++-v3/include/bits/stl_set.h
@@ -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)) { }
/**
diff --git a/libstdc++-v3/include/bits/stl_tree.h b/libstdc++-v3/include/bits/stl_tree.h
index 7ba6061a674..3b291c5bdb9 100644
--- a/libstdc++-v3/include/bits/stl_tree.h
+++ b/libstdc++-v3/include/bits/stl_tree.h
@@ -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)
{
diff --git a/libstdc++-v3/include/bits/stl_vector.h b/libstdc++-v3/include/bits/stl_vector.h
index 40770b1cd5a..5fa5f522e0c 100644
--- a/libstdc++-v3/include/bits/stl_vector.h
+++ b/libstdc++-v3/include/bits/stl_vector.h
@@ -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()); }