summaryrefslogtreecommitdiff
path: root/libstdc++-v3
diff options
context:
space:
mode:
authorbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2011-05-20 08:22:38 +0000
committerbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2011-05-20 08:22:38 +0000
commitccf4f3ae98386198926269817844b5bb67d3ebe4 (patch)
tree15db9a73406c618d2f18f1e9696a3f9549e5ace6 /libstdc++-v3
parent79fb55a1f085a3c03a9168b97773ddd9a4ad054a (diff)
downloadgcc-ccf4f3ae98386198926269817844b5bb67d3ebe4.tar.gz
2011-05-20 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 173935 using svnmerge git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@173937 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3')
-rw-r--r--libstdc++-v3/ChangeLog176
-rw-r--r--libstdc++-v3/doc/xml/manual/bitmap_allocator.xml6
-rw-r--r--libstdc++-v3/include/bits/algorithmfwd.h7
-rw-r--r--libstdc++-v3/include/bits/c++config11
-rw-r--r--libstdc++-v3/include/bits/move.h15
-rw-r--r--libstdc++-v3/include/bits/random.h8
-rw-r--r--libstdc++-v3/include/bits/shared_ptr.h52
-rw-r--r--libstdc++-v3/include/bits/shared_ptr_base.h198
-rw-r--r--libstdc++-v3/include/bits/stl_pair.h8
-rw-r--r--libstdc++-v3/include/debug/bitset63
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/basic_tree_policy/traits.hpp7
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/bin_search_tree_/bin_search_tree_.hpp20
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/binary_heap_/binary_heap_.hpp11
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/binary_heap_/resize_policy.hpp11
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/binomial_heap_/binomial_heap_.hpp4
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/binomial_heap_base_/binomial_heap_base_.hpp11
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/binomial_heap_base_/constructors_destructor_fn_imps.hpp12
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/binomial_heap_base_/erase_fn_imps.hpp14
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/binomial_heap_base_/find_fn_imps.hpp2
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/binomial_heap_base_/insert_fn_imps.hpp10
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/binomial_heap_base_/split_join_fn_imps.hpp22
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/cc_hash_table_map_/cc_ht_map_.hpp21
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/container_base_dispatch.hpp21
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/debug_map_base.hpp11
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/gp_hash_table_map_/gp_ht_map_.hpp20
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/left_child_next_sibling_heap_/left_child_next_sibling_heap_.hpp11
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/list_update_map_/lu_map_.hpp20
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/ov_tree_map_/ov_tree_map_.hpp22
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/pairing_heap_/pairing_heap_.hpp11
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/internal_node.hpp7
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/leaf.hpp7
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/pat_trie_.hpp20
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/priority_queue_base_dispatch.hpp12
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/rb_tree_map_/rb_tree_.hpp11
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/rc_binomial_heap_/rc.hpp11
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/rc_binomial_heap_/rc_binomial_heap_.hpp11
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/resize_policy/hash_load_check_resize_trigger_imp.hpp4
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/splay_tree_/splay_tree_.hpp19
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/thin_heap_/thin_heap_.hpp11
-rw-r--r--libstdc++-v3/include/profile/bitset61
-rw-r--r--libstdc++-v3/include/std/array63
-rw-r--r--libstdc++-v3/include/std/bitset248
-rw-r--r--libstdc++-v3/include/std/limits505
-rw-r--r--libstdc++-v3/include/std/tuple155
-rw-r--r--libstdc++-v3/include/std/type_traits114
-rw-r--r--libstdc++-v3/include/std/utility58
-rw-r--r--libstdc++-v3/libsupc++/initializer_list15
-rw-r--r--libstdc++-v3/testsuite/20_util/declval/requirements/1_neg.cc2
-rw-r--r--libstdc++-v3/testsuite/20_util/has_nothrow_copy_assign/value.cc57
-rw-r--r--libstdc++-v3/testsuite/20_util/is_assignable/requirements/explicit_instantiation.cc31
-rw-r--r--libstdc++-v3/testsuite/20_util/is_assignable/requirements/typedefs.cc (renamed from libstdc++-v3/testsuite/20_util/has_nothrow_copy_assign/requirements/typedefs.cc)10
-rw-r--r--libstdc++-v3/testsuite/20_util/is_assignable/value.cc675
-rw-r--r--libstdc++-v3/testsuite/20_util/is_copy_assignable/requirements/explicit_instantiation.cc30
-rw-r--r--libstdc++-v3/testsuite/20_util/is_copy_assignable/requirements/typedefs.cc36
-rw-r--r--libstdc++-v3/testsuite/20_util/is_copy_assignable/value.cc66
-rw-r--r--libstdc++-v3/testsuite/20_util/is_move_assignable/requirements/explicit_instantiation.cc30
-rw-r--r--libstdc++-v3/testsuite/20_util/is_move_assignable/requirements/typedefs.cc36
-rw-r--r--libstdc++-v3/testsuite/20_util/is_move_assignable/value.cc66
-rw-r--r--libstdc++-v3/testsuite/20_util/is_nothrow_assignable/requirements/explicit_instantiation.cc31
-rw-r--r--libstdc++-v3/testsuite/20_util/is_nothrow_assignable/requirements/typedefs.cc36
-rw-r--r--libstdc++-v3/testsuite/20_util/is_nothrow_assignable/value.cc58
-rw-r--r--libstdc++-v3/testsuite/20_util/is_nothrow_copy_assignable/requirements/explicit_instantiation.cc (renamed from libstdc++-v3/testsuite/20_util/has_nothrow_copy_assign/requirements/explicit_instantiation.cc)4
-rw-r--r--libstdc++-v3/testsuite/20_util/is_nothrow_copy_assignable/requirements/typedefs.cc36
-rw-r--r--libstdc++-v3/testsuite/20_util/is_nothrow_copy_assignable/value.cc75
-rw-r--r--libstdc++-v3/testsuite/20_util/is_nothrow_move_assignable/requirements/explicit_instantiation.cc30
-rw-r--r--libstdc++-v3/testsuite/20_util/is_nothrow_move_assignable/requirements/typedefs.cc36
-rw-r--r--libstdc++-v3/testsuite/20_util/is_nothrow_move_assignable/value.cc75
-rw-r--r--libstdc++-v3/testsuite/20_util/make_signed/requirements/typedefs_neg.cc4
-rw-r--r--libstdc++-v3/testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc4
-rw-r--r--libstdc++-v3/testsuite/20_util/pair/get.cc31
-rw-r--r--libstdc++-v3/testsuite/20_util/shared_ptr/cons/43820_neg.cc4
-rw-r--r--libstdc++-v3/testsuite/20_util/tuple/cv_tuple_element.cc34
-rw-r--r--libstdc++-v3/testsuite/20_util/tuple/cv_tuple_size.cc45
-rw-r--r--libstdc++-v3/testsuite/20_util/tuple/element_access/get2.cc41
-rw-r--r--libstdc++-v3/testsuite/20_util/tuple/noexcept_move_assign.cc59
-rw-r--r--libstdc++-v3/testsuite/20_util/tuple/noexcept_swap.cc116
-rw-r--r--libstdc++-v3/testsuite/20_util/weak_ptr/comparison/cmp_neg.cc10
-rw-r--r--libstdc++-v3/testsuite/23_containers/array/requirements/get.cc31
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/reverse/moveable.cc12
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/swap_ranges/moveable.cc10
-rw-r--r--libstdc++-v3/testsuite/26_numerics/headers/cmath/overloads_c++0x_neg.cc7
-rw-r--r--libstdc++-v3/testsuite/ext/profile/mutex_extensions_neg.cc2
-rw-r--r--libstdc++-v3/testsuite/tr1/8_c_compatibility/cmath/overloads_neg.cc5
-rw-r--r--libstdc++-v3/testsuite/util/testsuite_allocator.h9
-rw-r--r--libstdc++-v3/testsuite/util/testsuite_tr1.h246
85 files changed, 3154 insertions, 1073 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 0ba711832dc..f6b9159d235 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,179 @@
+2011-05-19 Paolo Carlini <paolo.carlini@oracle.com>
+
+ * include/std/tuple (tuple_element<__i, const _Tp>,
+ tuple_element<__i, volatile _Tp>, tuple_element<__i,
+ const volatile _Tp>, tuple_size<const _Tp>, tuple_size<volatile _Tp>,
+ tuple_size<const volatile _Tp>): Add.
+ * include/std/utility (tuple_size<std::pair<_Tp1, _Tp2>>): Tweak.
+ * include/std/array (tuple_size<array<_Tp, _Nm>>): Likewise.
+ * testsuite/20_util/tuple/cv_tuple_size.cc: New.
+ * testsuite/20_util/tuple/cv_tuple_element.cc: Likewise.
+ * testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Tweak dg-warning
+ line number.
+
+2011-05-19 Paolo Carlini <paolo.carlini@oracle.com>
+
+ * include/std/tuple (tuple<>::operator=(tuple&&)): Specify as
+ noexcept.
+ (__get_helper): Likewise.
+ (_Head_base<>::_M_head, _Tuple_impl<>::_M_head, _M_tail): Likewise.
+ * include/bits/move.h (swap): Likewise.
+ * include/bits/algorithmfwd.h (swap): Adjust.
+ * include/bits/stl_pair.h (pair<>::operator=(pair&&)): Spec noexcept.
+ * testsuite/util/testsuite_allocator.h (uneq_allocator): In C++0x
+ mode, prefer delete to access control to make the type not copy
+ assignable.
+ * testsuite/util/testsuite_tr1.h: Add test classes.
+ * testsuite/20_util/tuple/noexcept_swap.cc: New.
+ * testsuite/20_util/tuple/noexcept_move_assign.cc: Likewise.
+ * testsuite/25_algorithms/reverse/moveable.cc: Likewise, prefer
+ delete to access control.
+ * testsuite/25_algorithms/swap_ranges/moveable.cc: Likewise.
+ * testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Adjust dg-warning
+ line numbers.
+
+2011-05-19 Daniel Krugler <daniel.kruegler@googlemail.com>
+
+ * testsuite/util/testsuite_tr1.h: Add test classes.
+ * testsuite/20_util/is_nothrow_assignable/value.cc: Add.
+
+2011-05-19 Paolo Carlini <paolo.carlini@oracle.com>
+
+ * include/std/type_traits (is_assignable, is_copy_assignable,
+ is_move_assignable, is_nothrow_assignable, is_nothrow_copy_assignable,
+ is_nothrow_move_assignable): Add; minor tweaks elsewhere.
+ (has_nothrow_copy_assign): Remove.
+ * testsuite/util/testsuite_tr1.h: Add test classes.
+ * testsuite/20_util/is_assignable/requirements/typedefs.cc: Add.
+ * testsuite/20_util/is_assignable/requirements/
+ explicit_instantiation.cc: Likewise.
+ * testsuite/20_util/is_nothrow_assignable/value.cc: Likewise.
+ * testsuite/20_util/is_nothrow_assignable/requirements/typedefs.cc:
+ Likewise.
+ * testsuite/20_util/is_nothrow_assignable/requirements/
+ explicit_instantiation.cc: Likewise.
+ * testsuite/20_util/is_move_assignable/value.cc: Likewise.
+ * testsuite/20_util/is_move_assignable/requirements/typedefs.cc:
+ Likewise.
+ * testsuite/20_util/is_move_assignable/requirements/
+ explicit_instantiation.cc: Likewise.
+ * testsuite/20_util/is_copy_assignable/value.cc: Likewise.
+ * testsuite/20_util/is_copy_assignable/requirements/typedefs.cc:
+ Likewise.
+ * testsuite/20_util/is_copy_assignable/requirements/
+ explicit_instantiation.cc: Likewise.
+ * testsuite/20_util/is_nothrow_move_assignable/value.cc: Likewise.
+ * testsuite/20_util/is_nothrow_move_assignable/requirements/
+ typedefs.cc: Likewise.
+ * testsuite/20_util/is_nothrow_move_assignable/requirements/
+ explicit_instantiation.cc: Likewise.
+ * testsuite/20_util/is_nothrow_copy_assignable/value.cc: Likewise.
+ * testsuite/20_util/is_nothrow_copy_assignable/requirements/
+ typedefs.cc: Likewise.
+ * testsuite/20_util/is_nothrow_copy_assignable/requirements/
+ explicit_instantiation.cc: Likewise.
+ * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Adjust
+ dg-error line numbers.
+ * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc:
+ Likewise.
+ * testsuite/20_util/declval/requirements/1_neg.cc: Likewise.
+
+2011-05-18 Jonathan Wakely <jwakely.gcc@gmail.com>
+
+ * include/bits/shared_ptr_base.h: Use noexcept. Define special member
+ functions as defaulted/deleted.
+ * include/bits/shared_ptr.h: Use noexcept.
+ * 20_util/shared_ptr/cons/43820_neg.cc: Adjust dg-error line numbers.
+ * 20_util/weak_ptr/comparison/cmp_neg.cc: Likewise.
+
+2011-05-18 Jonathan Wakely <jwakely.gcc@gmail.com>
+
+ * doc/xml/manual/bitmap_allocator.xml: Fix typos.
+
+2011-05-18 Paolo Carlini <paolo.carlini@oracle.com>
+
+ * libsupc++/initializer_list: Use noexcept specifier.
+ (initializer_list<>::size, begin, end): Qualify as const.
+ * include/bits/move.h (__addressof, forward, move, addressof): Specify
+ as noexcept.
+ * include/std/bitset: Use noexcept specifier throughout.
+ * include/debug/bitset: Update.
+ * include/profile/bitset: Likewise.
+
+2011-05-17 Paolo Carlini <paolo.carlini@oracle.com>
+
+ * include/std/tuple: Use noexcept where appropriate.
+ (tuple<>::swap): Rework implementation.
+ (_Head_base<>::_M_swap_impl): Remove.
+ (get(std::tuple<>&&)): Add.
+ * testsuite/20_util/tuple/element_access/get2.cc: New.
+ * testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Adjust dg-error
+ line number.
+
+2011-05-16 Paolo Carlini <paolo.carlini@oracle.com>
+
+ * include/std/utility: Simplify the last commit, the whole
+ std::get code is C++0x only.
+
+2011-05-16 Paolo Carlini <paolo.carlini@oracle.com>
+
+ * include/std/utility (get(std::pair<>&&)): Add.
+ * include/bits/stl_pair.h (pair::swap(pair&),
+ swap(pair<>&, pair<>&)): Use noexcept.
+ * include/bits/random.h (discard_block_engine<>::base,
+ independent_bits_engine<>::base, shuffle_order_engine<>::base,
+ random_device::entropy): Use noexcept.
+ * include/std/array: Use noexcept where appropriate.
+ (get(array<>&&)): Add.
+ * testsuite/23_containers/array/requirements/get.cc: New.
+ * testsuite/20_util/pair/get.cc: Likewise.
+ * testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Tweak dg-error
+ line number.
+
+2011-05-15 Paolo Carlini <paolo.carlini@oracle.com>
+
+ * include/bits/c++config (_GLIBCXX_NOEXCEPT, _GLIBCXX_USE_NOEXCEPT):
+ Add.
+ * include/std/limits: Use the latter everywhere.
+ (numeric_limits<char16_t>, numeric_limits<char32_t>): Simplify
+ macro usages, the specializations exist only in C++0x mode.
+ * testsuite/ext/profile/mutex_extensions_neg.cc: Adjust dg-error
+ line number.
+
+2011-05-11 Paolo Carlini <paolo.carlini@oracle.com>
+
+ * testsuite/26_numerics/headers/cmath/overloads_c++0x_neg.cc: Use
+ dg-require-cmath.
+ * testsuite/tr1/8_c_compatibility/cmath/overloads_neg.cc: Likewise.
+
+2011-05-11 François Dumont <francois.cppdevs@free.fr>
+
+ * include/ext/pb_ds/detail/resize_policy/
+ hash_load_check_resize_trigger_imp.hpp (assert_valid): Replace
+ _GLIBCXX_DEBUG_ASSERT calls with PB_DS_DEBUG_VERIFY.
+ * include/ext/pb_ds/detail/binomial_heap_base_/erase_fn_imps.hpp,
+ find_fn_imps.hpp, insert_fn_imps.hpp, binomial_heap_base_.hpp,
+ constructors_destructor_fn_imps.hpp, split_join_fn_imps.hpp
+ (PB_DS_ASSERT_VALID): Rename in PB_DS_ASSERT_VALID_COND.
+ * include/ext/pb_ds/detail/debug_map_base.hpp,
+ splay_tree_/splay_tree_.hpp, ov_tree_map_/ov_tree_map_.hpp,
+ cc_hash_table_map_/cc_ht_map_.hpp, pat_trie_/pat_trie_.hpp,
+ leaf.hpp, internal_node.hpp, gp_hash_table_map_/gp_ht_map_.hpp,
+ bin_search_tree_/bin_search_tree_.hpp, list_update_map_/lu_map_.hpp,
+ rb_tree_map_/rb_tree_.hpp (PB_DS_ASSERT_VALID, PB_DS_DEBUG_VERIFY,
+ PB_DS_CHECK_KEY_EXISTS, PB_DS_CHECK_KEY_DOES_NOT_EXIST): Duplicate
+ macro definitions move...
+ * include/ext/pb_ds/detail/container_base_dispatch.hpp: ... here...
+ * include/ext/pb_ds/detail/basic_tree_policy/traits.hpp: ... and here.
+ * include/ext/pb_ds/detail/binary_heap_/binary_heap_.hpp,
+ resize_policy.hpp, pairing_heap_/pairing_heap_.hpp,
+ left_child_next_sibling_heap_/left_child_next_sibling_heap_.hpp,
+ binomial_heap_/binomial_heap_.hpp, thin_heap_/thin_heap_.hpp,
+ rc_binomial_heap_/rc_binomial_heap_.hpp, rc.hpp (PB_DS_ASSERT_VALID,
+ PB_DS_DEBUG_VERIFY): Duplicate macro definitions move...
+ * include/ext/pb_ds/detail/priority_queue_base_dispatch.hpp:
+ ...here.
+
2011-05-09 Paolo Carlini <paolo.carlini@oracle.com>
PR libstdc++/48933
diff --git a/libstdc++-v3/doc/xml/manual/bitmap_allocator.xml b/libstdc++-v3/doc/xml/manual/bitmap_allocator.xml
index 19b190661f0..300cbabcd5a 100644
--- a/libstdc++-v3/doc/xml/manual/bitmap_allocator.xml
+++ b/libstdc++-v3/doc/xml/manual/bitmap_allocator.xml
@@ -23,7 +23,7 @@
<para>
As this name suggests, this allocator uses a bit-map to keep track
- of the used and unused memory locations for it's book-keeping
+ of the used and unused memory locations for its book-keeping
purposes.
</para>
<para>
@@ -84,7 +84,7 @@
free list if it exists.
</para>
<para>
- Suppose the free list size has reached it's threshold, then the
+ Suppose the free list size has reached its threshold, then the
largest block from among those in the list and the new block will
be selected and given back to the OS. This is done because it
reduces external fragmentation, and allows the OS to use the
@@ -509,7 +509,7 @@ Block a bitmap as well?
<orderedlist>
<listitem><para>Constant time access for the bitmap themselves, since no kind of
-look up will be needed to find the correct bitmap list or it's
+look up will be needed to find the correct bitmap list or its
equivalent.</para></listitem>
<listitem><para>And also this would preserve the cache as far as possible.</para></listitem>
</orderedlist>
diff --git a/libstdc++-v3/include/bits/algorithmfwd.h b/libstdc++-v3/include/bits/algorithmfwd.h
index 8632bf5dd63..fe3b68f6a25 100644
--- a/libstdc++-v3/include/bits/algorithmfwd.h
+++ b/libstdc++-v3/include/bits/algorithmfwd.h
@@ -549,7 +549,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
template<typename _Tp>
void
- swap(_Tp&, _Tp&);
+ swap(_Tp&, _Tp&)
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ noexcept(is_nothrow_move_constructible<_Tp>::value
+ && is_nothrow_move_assignable<_Tp>::value)
+#endif
+ ;
template<typename _Tp, size_t _Nm>
void
diff --git a/libstdc++-v3/include/bits/c++config b/libstdc++-v3/include/bits/c++config
index 8ac3c159d8c..5cb654b45b7 100644
--- a/libstdc++-v3/include/bits/c++config
+++ b/libstdc++-v3/include/bits/c++config
@@ -99,6 +99,17 @@
# endif
#endif
+// Macro for noexcept, to support in mixed 03/0x mode.
+#ifndef _GLIBCXX_NOEXCEPT
+# ifdef __GXX_EXPERIMENTAL_CXX0X__
+# define _GLIBCXX_NOEXCEPT noexcept
+# define _GLIBCXX_USE_NOEXCEPT noexcept
+# else
+# define _GLIBCXX_NOEXCEPT
+# define _GLIBCXX_USE_NOEXCEPT throw()
+# endif
+#endif
+
// Macro for extern template, ie controling template linkage via use
// of extern keyword on template declaration. As documented in the g++
// manual, it inhibits all implicit instantiations and is used
diff --git a/libstdc++-v3/include/bits/move.h b/libstdc++-v3/include/bits/move.h
index a6dd2378eda..963dd4c655d 100644
--- a/libstdc++-v3/include/bits/move.h
+++ b/libstdc++-v3/include/bits/move.h
@@ -40,7 +40,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
// Used, in C++03 mode too, by allocators, etc.
template<typename _Tp>
inline _Tp*
- __addressof(_Tp& __r)
+ __addressof(_Tp& __r) _GLIBCXX_NOEXCEPT
{
return reinterpret_cast<_Tp*>
(&const_cast<char&>(reinterpret_cast<const volatile char&>(__r)));
@@ -59,12 +59,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
/// forward (as per N3143)
template<typename _Tp>
inline _Tp&&
- forward(typename std::remove_reference<_Tp>::type& __t)
+ forward(typename std::remove_reference<_Tp>::type& __t) noexcept
{ return static_cast<_Tp&&>(__t); }
template<typename _Tp>
inline _Tp&&
- forward(typename std::remove_reference<_Tp>::type&& __t)
+ forward(typename std::remove_reference<_Tp>::type&& __t) noexcept
{
static_assert(!std::is_lvalue_reference<_Tp>::value, "template argument"
" substituting _Tp is an lvalue reference type");
@@ -79,7 +79,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
*/
template<typename _Tp>
inline typename std::remove_reference<_Tp>::type&&
- move(_Tp&& __t)
+ move(_Tp&& __t) noexcept
{ return static_cast<typename std::remove_reference<_Tp>::type&&>(__t); }
/**
@@ -108,7 +108,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
*/
template<typename _Tp>
inline _Tp*
- addressof(_Tp& __r)
+ addressof(_Tp& __r) noexcept
{ return std::__addressof(__r); }
_GLIBCXX_END_NAMESPACE_VERSION
@@ -135,6 +135,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
template<typename _Tp>
inline void
swap(_Tp& __a, _Tp& __b)
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ noexcept(is_nothrow_move_constructible<_Tp>::value
+ && is_nothrow_move_assignable<_Tp>::value)
+#endif
{
// concept requirements
__glibcxx_function_requires(_SGIAssignableConcept<_Tp>)
@@ -149,6 +153,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
template<typename _Tp, size_t _Nm>
inline void
swap(_Tp (&__a)[_Nm], _Tp (&__b)[_Nm])
+ // noexcept waits for c++/49045
{
for (size_t __n = 0; __n < _Nm; ++__n)
swap(__a[__n], __b[__n]);
diff --git a/libstdc++-v3/include/bits/random.h b/libstdc++-v3/include/bits/random.h
index 7b7f5966b3c..f8f7ce9522e 100644
--- a/libstdc++-v3/include/bits/random.h
+++ b/libstdc++-v3/include/bits/random.h
@@ -881,7 +881,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
* object.
*/
const _RandomNumberEngine&
- base() const
+ base() const noexcept
{ return _M_b; }
/**
@@ -1090,7 +1090,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
* object.
*/
const _RandomNumberEngine&
- base() const
+ base() const noexcept
{ return _M_b; }
/**
@@ -1320,7 +1320,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
* Gets a const reference to the underlying generator engine object.
*/
const _RandomNumberEngine&
- base() const
+ base() const noexcept
{ return _M_b; }
/**
@@ -1553,7 +1553,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
{ return std::numeric_limits<result_type>::max(); }
double
- entropy() const
+ entropy() const noexcept
{ return 0.0; }
result_type
diff --git a/libstdc++-v3/include/bits/shared_ptr.h b/libstdc++-v3/include/bits/shared_ptr.h
index 490810cabf6..2158de6bf81 100644
--- a/libstdc++-v3/include/bits/shared_ptr.h
+++ b/libstdc++-v3/include/bits/shared_ptr.h
@@ -73,7 +73,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
/// 2.2.3.10 shared_ptr get_deleter (experimental)
template<typename _Del, typename _Tp, _Lock_policy _Lp>
inline _Del*
- get_deleter(const __shared_ptr<_Tp, _Lp>& __p)
+ get_deleter(const __shared_ptr<_Tp, _Lp>& __p) noexcept
{
#ifdef __GXX_RTTI
return static_cast<_Del*>(__p._M_get_deleter(typeid(_Del)));
@@ -97,7 +97,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
* @brief Construct an empty %shared_ptr.
* @post use_count()==0 && get()==0
*/
- constexpr shared_ptr()
+ constexpr shared_ptr() noexcept
: __shared_ptr<_Tp>() { }
/**
@@ -201,7 +201,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
* @endcode
*/
template<typename _Tp1>
- shared_ptr(const shared_ptr<_Tp1>& __r, _Tp* __p)
+ shared_ptr(const shared_ptr<_Tp1>& __r, _Tp* __p) noexcept
: __shared_ptr<_Tp>(__r, __p) { }
/**
@@ -213,7 +213,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
*/
template<typename _Tp1, typename = typename
std::enable_if<std::is_convertible<_Tp1*, _Tp*>::value>::type>
- shared_ptr(const shared_ptr<_Tp1>& __r)
+ shared_ptr(const shared_ptr<_Tp1>& __r) noexcept
: __shared_ptr<_Tp>(__r) { }
/**
@@ -221,7 +221,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
* @param __r A %shared_ptr rvalue.
* @post *this contains the old value of @a __r, @a __r is empty.
*/
- shared_ptr(shared_ptr&& __r)
+ shared_ptr(shared_ptr&& __r) noexcept
: __shared_ptr<_Tp>(std::move(__r)) { }
/**
@@ -231,7 +231,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
*/
template<typename _Tp1, typename = typename
std::enable_if<std::is_convertible<_Tp1*, _Tp*>::value>::type>
- shared_ptr(shared_ptr<_Tp1>&& __r)
+ shared_ptr(shared_ptr<_Tp1>&& __r) noexcept
: __shared_ptr<_Tp>(std::move(__r)) { }
/**
@@ -261,12 +261,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
* @param __p A null pointer constant.
* @post use_count() == 0 && get() == nullptr
*/
- constexpr shared_ptr(nullptr_t __p)
+ constexpr shared_ptr(nullptr_t __p) noexcept
: __shared_ptr<_Tp>(__p) { }
template<typename _Tp1>
shared_ptr&
- operator=(const shared_ptr<_Tp1>& __r) // never throws
+ operator=(const shared_ptr<_Tp1>& __r) noexcept
{
this->__shared_ptr<_Tp>::operator=(__r);
return *this;
@@ -283,7 +283,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
#endif
shared_ptr&
- operator=(shared_ptr&& __r)
+ operator=(shared_ptr&& __r) noexcept
{
this->__shared_ptr<_Tp>::operator=(std::move(__r));
return *this;
@@ -291,7 +291,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
template<class _Tp1>
shared_ptr&
- operator=(shared_ptr<_Tp1>&& __r)
+ operator=(shared_ptr<_Tp1>&& __r) noexcept
{
this->__shared_ptr<_Tp>::operator=(std::move(__r));
return *this;
@@ -425,23 +425,23 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
// 20.8.13.2.9 shared_ptr specialized algorithms.
template<typename _Tp>
inline void
- swap(shared_ptr<_Tp>& __a, shared_ptr<_Tp>& __b)
+ swap(shared_ptr<_Tp>& __a, shared_ptr<_Tp>& __b) noexcept
{ __a.swap(__b); }
// 20.8.13.2.10 shared_ptr casts.
template<typename _Tp, typename _Tp1>
inline shared_ptr<_Tp>
- static_pointer_cast(const shared_ptr<_Tp1>& __r)
+ static_pointer_cast(const shared_ptr<_Tp1>& __r) noexcept
{ return shared_ptr<_Tp>(__r, static_cast<_Tp*>(__r.get())); }
template<typename _Tp, typename _Tp1>
inline shared_ptr<_Tp>
- const_pointer_cast(const shared_ptr<_Tp1>& __r)
+ const_pointer_cast(const shared_ptr<_Tp1>& __r) noexcept
{ return shared_ptr<_Tp>(__r, const_cast<_Tp*>(__r.get())); }
template<typename _Tp, typename _Tp1>
inline shared_ptr<_Tp>
- dynamic_pointer_cast(const shared_ptr<_Tp1>& __r)
+ dynamic_pointer_cast(const shared_ptr<_Tp1>& __r) noexcept
{
if (_Tp* __p = dynamic_cast<_Tp*>(__r.get()))
return shared_ptr<_Tp>(__r, __p);
@@ -458,22 +458,22 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
class weak_ptr : public __weak_ptr<_Tp>
{
public:
- constexpr weak_ptr()
+ constexpr weak_ptr() noexcept
: __weak_ptr<_Tp>() { }
template<typename _Tp1, typename = typename
std::enable_if<std::is_convertible<_Tp1*, _Tp*>::value>::type>
- weak_ptr(const weak_ptr<_Tp1>& __r)
+ weak_ptr(const weak_ptr<_Tp1>& __r) noexcept
: __weak_ptr<_Tp>(__r) { }
template<typename _Tp1, typename = typename
std::enable_if<std::is_convertible<_Tp1*, _Tp*>::value>::type>
- weak_ptr(const shared_ptr<_Tp1>& __r)
+ weak_ptr(const shared_ptr<_Tp1>& __r) noexcept
: __weak_ptr<_Tp>(__r) { }
template<typename _Tp1>
weak_ptr&
- operator=(const weak_ptr<_Tp1>& __r) // never throws
+ operator=(const weak_ptr<_Tp1>& __r) noexcept
{
this->__weak_ptr<_Tp>::operator=(__r);
return *this;
@@ -481,14 +481,14 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
template<typename _Tp1>
weak_ptr&
- operator=(const shared_ptr<_Tp1>& __r) // never throws
+ operator=(const shared_ptr<_Tp1>& __r) noexcept
{
this->__weak_ptr<_Tp>::operator=(__r);
return *this;
}
shared_ptr<_Tp>
- lock() const // never throws
+ lock() const noexcept
{
#ifdef __GTHREADS
if (this->expired())
@@ -511,7 +511,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
// 20.8.13.3.7 weak_ptr specialized algorithms.
template<typename _Tp>
inline void
- swap(weak_ptr<_Tp>& __a, weak_ptr<_Tp>& __b)
+ swap(weak_ptr<_Tp>& __a, weak_ptr<_Tp>& __b) noexcept
{ __a.swap(__b); }
@@ -538,12 +538,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
class enable_shared_from_this
{
protected:
- constexpr enable_shared_from_this() { }
+ constexpr enable_shared_from_this() noexcept { }
- enable_shared_from_this(const enable_shared_from_this&) { }
+ enable_shared_from_this(const enable_shared_from_this&) noexcept { }
enable_shared_from_this&
- operator=(const enable_shared_from_this&)
+ operator=(const enable_shared_from_this&) noexcept
{ return *this; }
~enable_shared_from_this() { }
@@ -560,14 +560,14 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
private:
template<typename _Tp1>
void
- _M_weak_assign(_Tp1* __p, const __shared_count<>& __n) const
+ _M_weak_assign(_Tp1* __p, const __shared_count<>& __n) const noexcept
{ _M_weak_this._M_assign(__p, __n); }
template<typename _Tp1>
friend void
__enable_shared_from_this_helper(const __shared_count<>& __pn,
const enable_shared_from_this* __pe,
- const _Tp1* __px)
+ const _Tp1* __px) noexcept
{
if (__pe != 0)
__pe->_M_weak_assign(const_cast<_Tp1*>(__px), __pn);
diff --git a/libstdc++-v3/include/bits/shared_ptr_base.h b/libstdc++-v3/include/bits/shared_ptr_base.h
index 937e4f42784..0a84b3c1259 100644
--- a/libstdc++-v3/include/bits/shared_ptr_base.h
+++ b/libstdc++-v3/include/bits/shared_ptr_base.h
@@ -61,7 +61,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
{
public:
virtual char const*
- what() const throw();
+ what() const noexcept;
virtual ~bad_weak_ptr() throw();
};
@@ -108,21 +108,21 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
: public _Mutex_base<_Lp>
{
public:
- _Sp_counted_base()
+ _Sp_counted_base() noexcept
: _M_use_count(1), _M_weak_count(1) { }
virtual
- ~_Sp_counted_base() // nothrow
+ ~_Sp_counted_base() noexcept
{ }
// Called when _M_use_count drops to zero, to release the resources
// managed by *this.
virtual void
- _M_dispose() = 0; // nothrow
+ _M_dispose() noexcept = 0;
// Called when _M_weak_count drops to zero.
virtual void
- _M_destroy() // nothrow
+ _M_destroy() noexcept
{ delete this; }
virtual void*
@@ -136,7 +136,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
_M_add_ref_lock();
void
- _M_release() // nothrow
+ _M_release() noexcept
{
// Be race-detector-friendly. For more info see bits/c++config.
_GLIBCXX_SYNCHRONIZATION_HAPPENS_BEFORE(&_M_use_count);
@@ -166,11 +166,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
}
void
- _M_weak_add_ref() // nothrow
+ _M_weak_add_ref() noexcept
{ __gnu_cxx::__atomic_add_dispatch(&_M_weak_count, 1); }
void
- _M_weak_release() // nothrow
+ _M_weak_release() noexcept
{
// Be race-detector-friendly. For more info see bits/c++config.
_GLIBCXX_SYNCHRONIZATION_HAPPENS_BEFORE(&_M_weak_count);
@@ -189,7 +189,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
}
long
- _M_get_use_count() const // nothrow
+ _M_get_use_count() const noexcept
{
// No memory barrier is used here so there is no synchronization
// with other threads.
@@ -197,8 +197,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
}
private:
- _Sp_counted_base(_Sp_counted_base const&);
- _Sp_counted_base& operator=(_Sp_counted_base const&);
+ _Sp_counted_base(_Sp_counted_base const&) = delete;
+ _Sp_counted_base& operator=(_Sp_counted_base const&) = delete;
_Atomic_word _M_use_count; // #shared
_Atomic_word _M_weak_count; // #weak + (#shared != 0)
@@ -289,11 +289,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
: _M_ptr(__p) { }
virtual void
- _M_dispose() // nothrow
+ _M_dispose() noexcept
{ delete _M_ptr; }
virtual void
- _M_destroy() // nothrow
+ _M_destroy() noexcept
{ delete this; }
virtual void*
@@ -309,15 +309,15 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
template<>
inline void
- _Sp_counted_ptr<nullptr_t, _S_single>::_M_dispose() { }
+ _Sp_counted_ptr<nullptr_t, _S_single>::_M_dispose() noexcept { }
template<>
inline void
- _Sp_counted_ptr<nullptr_t, _S_mutex>::_M_dispose() { }
+ _Sp_counted_ptr<nullptr_t, _S_mutex>::_M_dispose() noexcept { }
template<>
inline void
- _Sp_counted_ptr<nullptr_t, _S_atomic>::_M_dispose() { }
+ _Sp_counted_ptr<nullptr_t, _S_atomic>::_M_dispose() noexcept { }
// Support for custom deleter and/or allocator
template<typename _Ptr, typename _Deleter, typename _Alloc, _Lock_policy _Lp>
@@ -347,11 +347,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
: _M_ptr(__p), _M_del(__d, __a) { }
virtual void
- _M_dispose() // nothrow
+ _M_dispose() noexcept
{ _M_del._M_del(_M_ptr); }
virtual void
- _M_destroy() // nothrow
+ _M_destroy() noexcept
{
_My_alloc_type __a(_M_del);
this->~_Sp_counted_deleter();
@@ -413,7 +413,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
// Override because the allocator needs to know the dynamic type
virtual void
- _M_destroy() // nothrow
+ _M_destroy() noexcept
{
typedef typename _Alloc::template
rebind<_Sp_counted_ptr_inplace>::other _My_alloc_type;
@@ -424,7 +424,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
// Sneaky trick so __shared_ptr can get the managed pointer
virtual void*
- _M_get_deleter(const std::type_info& __ti)
+ _M_get_deleter(const std::type_info& __ti) noexcept
{
#ifdef __GXX_RTTI
return __ti == typeid(_Sp_make_shared_tag)
@@ -444,7 +444,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
class __shared_count
{
public:
- constexpr __shared_count() : _M_pi(0) // nothrow
+ constexpr __shared_count() noexcept : _M_pi(0)
{ }
template<typename _Ptr>
@@ -545,21 +545,21 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
// Throw bad_weak_ptr when __r._M_get_use_count() == 0.
explicit __shared_count(const __weak_count<_Lp>& __r);
- ~__shared_count() // nothrow
+ ~__shared_count() noexcept
{
if (_M_pi != 0)
_M_pi->_M_release();
}
- __shared_count(const __shared_count& __r)
- : _M_pi(__r._M_pi) // nothrow
+ __shared_count(const __shared_count& __r) noexcept
+ : _M_pi(__r._M_pi)
{
if (_M_pi != 0)
_M_pi->_M_add_ref_copy();
}
__shared_count&
- operator=(const __shared_count& __r) // nothrow
+ operator=(const __shared_count& __r) noexcept
{
_Sp_counted_base<_Lp>* __tmp = __r._M_pi;
if (__tmp != _M_pi)
@@ -574,7 +574,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
}
void
- _M_swap(__shared_count& __r) // nothrow
+ _M_swap(__shared_count& __r) noexcept
{
_Sp_counted_base<_Lp>* __tmp = __r._M_pi;
__r._M_pi = _M_pi;
@@ -582,28 +582,28 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
}
long
- _M_get_use_count() const // nothrow
+ _M_get_use_count() const noexcept
{ return _M_pi != 0 ? _M_pi->_M_get_use_count() : 0; }
bool
- _M_unique() const // nothrow
+ _M_unique() const noexcept
{ return this->_M_get_use_count() == 1; }
void*
- _M_get_deleter(const std::type_info& __ti) const
+ _M_get_deleter(const std::type_info& __ti) const noexcept
{ return _M_pi ? _M_pi->_M_get_deleter(__ti) : 0; }
bool
- _M_less(const __shared_count& __rhs) const
+ _M_less(const __shared_count& __rhs) const noexcept
{ return std::less<_Sp_counted_base<_Lp>*>()(this->_M_pi, __rhs._M_pi); }
bool
- _M_less(const __weak_count<_Lp>& __rhs) const
+ _M_less(const __weak_count<_Lp>& __rhs) const noexcept
{ return std::less<_Sp_counted_base<_Lp>*>()(this->_M_pi, __rhs._M_pi); }
// Friend function injected into enclosing namespace and found by ADL
friend inline bool
- operator==(const __shared_count& __a, const __shared_count& __b)
+ operator==(const __shared_count& __a, const __shared_count& __b) noexcept
{ return __a._M_pi == __b._M_pi; }
private:
@@ -637,29 +637,31 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
class __weak_count
{
public:
- constexpr __weak_count() : _M_pi(0) // nothrow
+ constexpr __weak_count() noexcept : _M_pi(0)
{ }
- __weak_count(const __shared_count<_Lp>& __r) : _M_pi(__r._M_pi) // nothrow
+ __weak_count(const __shared_count<_Lp>& __r) noexcept
+ : _M_pi(__r._M_pi)
{
if (_M_pi != 0)
_M_pi->_M_weak_add_ref();
}
- __weak_count(const __weak_count<_Lp>& __r) : _M_pi(__r._M_pi) // nothrow
+ __weak_count(const __weak_count<_Lp>& __r) noexcept
+ : _M_pi(__r._M_pi)
{
if (_M_pi != 0)
_M_pi->_M_weak_add_ref();
}
- ~__weak_count() // nothrow
+ ~__weak_count() noexcept
{
if (_M_pi != 0)
_M_pi->_M_weak_release();
}
__weak_count<_Lp>&
- operator=(const __shared_count<_Lp>& __r) // nothrow
+ operator=(const __shared_count<_Lp>& __r) noexcept
{
_Sp_counted_base<_Lp>* __tmp = __r._M_pi;
if (__tmp != 0)
@@ -671,7 +673,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
}
__weak_count<_Lp>&
- operator=(const __weak_count<_Lp>& __r) // nothrow
+ operator=(const __weak_count<_Lp>& __r) noexcept
{
_Sp_counted_base<_Lp>* __tmp = __r._M_pi;
if (__tmp != 0)
@@ -683,7 +685,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
}
void
- _M_swap(__weak_count<_Lp>& __r) // nothrow
+ _M_swap(__weak_count<_Lp>& __r) noexcept
{
_Sp_counted_base<_Lp>* __tmp = __r._M_pi;
__r._M_pi = _M_pi;
@@ -691,20 +693,20 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
}
long
- _M_get_use_count() const // nothrow
+ _M_get_use_count() const noexcept
{ return _M_pi != 0 ? _M_pi->_M_get_use_count() : 0; }
bool
- _M_less(const __weak_count& __rhs) const
+ _M_less(const __weak_count& __rhs) const noexcept
{ return std::less<_Sp_counted_base<_Lp>*>()(this->_M_pi, __rhs._M_pi); }
bool
- _M_less(const __shared_count<_Lp>& __rhs) const
+ _M_less(const __shared_count<_Lp>& __rhs) const noexcept
{ return std::less<_Sp_counted_base<_Lp>*>()(this->_M_pi, __rhs._M_pi); }
// Friend function injected into enclosing namespace and found by ADL
friend inline bool
- operator==(const __weak_count& __a, const __weak_count& __b)
+ operator==(const __weak_count& __a, const __weak_count& __b) noexcept
{ return __a._M_pi == __b._M_pi; }
private:
@@ -732,18 +734,18 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
void
__enable_shared_from_this_helper(const __shared_count<_Lp>&,
const __enable_shared_from_this<_Tp1,
- _Lp>*, const _Tp2*);
+ _Lp>*, const _Tp2*) noexcept;
// Friend of enable_shared_from_this.
template<typename _Tp1, typename _Tp2>
void
__enable_shared_from_this_helper(const __shared_count<>&,
const enable_shared_from_this<_Tp1>*,
- const _Tp2*);
+ const _Tp2*) noexcept;
template<_Lock_policy _Lp>
inline void
- __enable_shared_from_this_helper(const __shared_count<_Lp>&, ...)
+ __enable_shared_from_this_helper(const __shared_count<_Lp>&, ...) noexcept
{ }
@@ -753,8 +755,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
public:
typedef _Tp element_type;
- constexpr __shared_ptr()
- : _M_ptr(0), _M_refcount() // never throws
+ constexpr __shared_ptr() noexcept
+ : _M_ptr(0), _M_refcount()
{ }
template<typename _Tp1>
@@ -795,20 +797,22 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
{ }
template<typename _Tp1>
- __shared_ptr(const __shared_ptr<_Tp1, _Lp>& __r, _Tp* __p)
+ __shared_ptr(const __shared_ptr<_Tp1, _Lp>& __r, _Tp* __p) noexcept
: _M_ptr(__p), _M_refcount(__r._M_refcount) // never throws
{ }
- // generated copy constructor, assignment, destructor are fine.
+ __shared_ptr(const __shared_ptr&) noexcept = default;
+ __shared_ptr& operator=(const __shared_ptr&) noexcept = default;
+ ~__shared_ptr() = default;
template<typename _Tp1, typename = typename
std::enable_if<std::is_convertible<_Tp1*, _Tp*>::value>::type>
- __shared_ptr(const __shared_ptr<_Tp1, _Lp>& __r)
- : _M_ptr(__r._M_ptr), _M_refcount(__r._M_refcount) // never throws
+ __shared_ptr(const __shared_ptr<_Tp1, _Lp>& __r) noexcept
+ : _M_ptr(__r._M_ptr), _M_refcount(__r._M_refcount)
{ }
- __shared_ptr(__shared_ptr&& __r)
- : _M_ptr(__r._M_ptr), _M_refcount() // never throws
+ __shared_ptr(__shared_ptr&& __r) noexcept
+ : _M_ptr(__r._M_ptr), _M_refcount()
{
_M_refcount._M_swap(__r._M_refcount);
__r._M_ptr = 0;
@@ -816,8 +820,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
template<typename _Tp1, typename = typename
std::enable_if<std::is_convertible<_Tp1*, _Tp*>::value>::type>
- __shared_ptr(__shared_ptr<_Tp1, _Lp>&& __r)
- : _M_ptr(__r._M_ptr), _M_refcount() // never throws
+ __shared_ptr(__shared_ptr<_Tp1, _Lp>&& __r) noexcept
+ : _M_ptr(__r._M_ptr), _M_refcount()
{
_M_refcount._M_swap(__r._M_refcount);
__r._M_ptr = 0;
@@ -860,13 +864,13 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
#endif
/* TODO: use delegating constructor */
- constexpr __shared_ptr(nullptr_t)
- : _M_ptr(0), _M_refcount() // never throws
+ constexpr __shared_ptr(nullptr_t) noexcept
+ : _M_ptr(0), _M_refcount()
{ }
template<typename _Tp1>
__shared_ptr&
- operator=(const __shared_ptr<_Tp1, _Lp>& __r) // never throws
+ operator=(const __shared_ptr<_Tp1, _Lp>& __r) noexcept
{
_M_ptr = __r._M_ptr;
_M_refcount = __r._M_refcount; // __shared_count::op= doesn't throw
@@ -884,7 +888,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
#endif
__shared_ptr&
- operator=(__shared_ptr&& __r)
+ operator=(__shared_ptr&& __r) noexcept
{
__shared_ptr(std::move(__r)).swap(*this);
return *this;
@@ -892,7 +896,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
template<class _Tp1>
__shared_ptr&
- operator=(__shared_ptr<_Tp1, _Lp>&& __r)
+ operator=(__shared_ptr<_Tp1, _Lp>&& __r) noexcept
{
__shared_ptr(std::move(__r)).swap(*this);
return *this;
@@ -907,7 +911,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
}
void
- reset() // never throws
+ reset() noexcept
{ __shared_ptr().swap(*this); }
template<typename _Tp1>
@@ -931,36 +935,36 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
// Allow class instantiation when _Tp is [cv-qual] void.
typename std::add_lvalue_reference<_Tp>::type
- operator*() const // never throws
+ operator*() const noexcept
{
_GLIBCXX_DEBUG_ASSERT(_M_ptr != 0);
return *_M_ptr;
}
_Tp*
- operator->() const // never throws
+ operator->() const noexcept
{
_GLIBCXX_DEBUG_ASSERT(_M_ptr != 0);
return _M_ptr;
}
_Tp*
- get() const // never throws
+ get() const noexcept
{ return _M_ptr; }
explicit operator bool() const // never throws
{ return _M_ptr == 0 ? false : true; }
bool
- unique() const // never throws
+ unique() const noexcept
{ return _M_refcount._M_unique(); }
long
- use_count() const // never throws
+ use_count() const noexcept
{ return _M_refcount._M_get_use_count(); }
void
- swap(__shared_ptr<_Tp, _Lp>& __other) // never throws
+ swap(__shared_ptr<_Tp, _Lp>& __other) noexcept
{
std::swap(_M_ptr, __other._M_ptr);
_M_refcount._M_swap(__other._M_refcount);
@@ -1033,14 +1037,14 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
private:
void*
- _M_get_deleter(const std::type_info& __ti) const
+ _M_get_deleter(const std::type_info& __ti) const noexcept
{ return _M_refcount._M_get_deleter(__ti); }
template<typename _Tp1, _Lock_policy _Lp1> friend class __shared_ptr;
template<typename _Tp1, _Lock_policy _Lp1> friend class __weak_ptr;
template<typename _Del, typename _Tp1, _Lock_policy _Lp1>
- friend _Del* get_deleter(const __shared_ptr<_Tp1, _Lp1>&);
+ friend _Del* get_deleter(const __shared_ptr<_Tp1, _Lp1>&) noexcept;
_Tp* _M_ptr; // Contained pointer.
__shared_count<_Lp> _M_refcount; // Reference counter.
@@ -1151,7 +1155,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
struct _Sp_less : public binary_function<_Sp, _Sp, bool>
{
bool
- operator()(const _Sp& __lhs, const _Sp& __rhs) const
+ operator()(const _Sp& __lhs, const _Sp& __rhs) const noexcept
{
typedef typename _Sp::element_type element_type;
return std::less<element_type*>()(__lhs.get(), __rhs.get());
@@ -1166,7 +1170,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
// 2.2.3.8 shared_ptr specialized algorithms.
template<typename _Tp, _Lock_policy _Lp>
inline void
- swap(__shared_ptr<_Tp, _Lp>& __a, __shared_ptr<_Tp, _Lp>& __b)
+ swap(__shared_ptr<_Tp, _Lp>& __a, __shared_ptr<_Tp, _Lp>& __b) noexcept
{ __a.swap(__b); }
// 2.2.3.9 shared_ptr casts
@@ -1178,7 +1182,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
/// static_pointer_cast
template<typename _Tp, typename _Tp1, _Lock_policy _Lp>
inline __shared_ptr<_Tp, _Lp>
- static_pointer_cast(const __shared_ptr<_Tp1, _Lp>& __r)
+ static_pointer_cast(const __shared_ptr<_Tp1, _Lp>& __r) noexcept
{ return __shared_ptr<_Tp, _Lp>(__r, static_cast<_Tp*>(__r.get())); }
// The seemingly equivalent code:
@@ -1188,7 +1192,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
/// const_pointer_cast
template<typename _Tp, typename _Tp1, _Lock_policy _Lp>
inline __shared_ptr<_Tp, _Lp>
- const_pointer_cast(const __shared_ptr<_Tp1, _Lp>& __r)
+ const_pointer_cast(const __shared_ptr<_Tp1, _Lp>& __r) noexcept
{ return __shared_ptr<_Tp, _Lp>(__r, const_cast<_Tp*>(__r.get())); }
// The seemingly equivalent code:
@@ -1198,7 +1202,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
/// dynamic_pointer_cast
template<typename _Tp, typename _Tp1, _Lock_policy _Lp>
inline __shared_ptr<_Tp, _Lp>
- dynamic_pointer_cast(const __shared_ptr<_Tp1, _Lp>& __r)
+ dynamic_pointer_cast(const __shared_ptr<_Tp1, _Lp>& __r) noexcept
{
if (_Tp* __p = dynamic_cast<_Tp*>(__r.get()))
return __shared_ptr<_Tp, _Lp>(__r, __p);
@@ -1212,11 +1216,13 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
public:
typedef _Tp element_type;
- constexpr __weak_ptr()
- : _M_ptr(0), _M_refcount() // never throws
+ constexpr __weak_ptr() noexcept
+ : _M_ptr(0), _M_refcount()
{ }
- // Generated copy constructor, assignment, destructor are fine.
+ __weak_ptr(const __weak_ptr&) noexcept = default;
+ __weak_ptr& operator=(const __weak_ptr&) noexcept = default;
+ ~__weak_ptr() = default;
// The "obvious" converting constructor implementation:
//
@@ -1234,19 +1240,19 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
// in multithreaded programs __r._M_ptr may be invalidated at any point.
template<typename _Tp1, typename = typename
std::enable_if<std::is_convertible<_Tp1*, _Tp*>::value>::type>
- __weak_ptr(const __weak_ptr<_Tp1, _Lp>& __r)
- : _M_refcount(__r._M_refcount) // never throws
+ __weak_ptr(const __weak_ptr<_Tp1, _Lp>& __r) noexcept
+ : _M_refcount(__r._M_refcount)
{ _M_ptr = __r.lock().get(); }
template<typename _Tp1, typename = typename
std::enable_if<std::is_convertible<_Tp1*, _Tp*>::value>::type>
- __weak_ptr(const __shared_ptr<_Tp1, _Lp>& __r)
- : _M_ptr(__r._M_ptr), _M_refcount(__r._M_refcount) // never throws
+ __weak_ptr(const __shared_ptr<_Tp1, _Lp>& __r) noexcept
+ : _M_ptr(__r._M_ptr), _M_refcount(__r._M_refcount)
{ }
template<typename _Tp1>
__weak_ptr&
- operator=(const __weak_ptr<_Tp1, _Lp>& __r) // never throws
+ operator=(const __weak_ptr<_Tp1, _Lp>& __r) noexcept
{
_M_ptr = __r.lock().get();
_M_refcount = __r._M_refcount;
@@ -1255,7 +1261,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
template<typename _Tp1>
__weak_ptr&
- operator=(const __shared_ptr<_Tp1, _Lp>& __r) // never throws
+ operator=(const __shared_ptr<_Tp1, _Lp>& __r) noexcept
{
_M_ptr = __r._M_ptr;
_M_refcount = __r._M_refcount;
@@ -1263,7 +1269,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
}
__shared_ptr<_Tp, _Lp>
- lock() const // never throws
+ lock() const noexcept
{
#ifdef __GTHREADS
// Optimization: avoid throw overhead.
@@ -1291,11 +1297,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
} // XXX MT
long
- use_count() const // never throws
+ use_count() const noexcept
{ return _M_refcount._M_get_use_count(); }
bool
- expired() const // never throws
+ expired() const noexcept
{ return _M_refcount._M_get_use_count() == 0; }
template<typename _Tp1>
@@ -1309,11 +1315,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
{ return _M_refcount._M_less(__rhs._M_refcount); }
void
- reset() // never throws
+ reset() noexcept
{ __weak_ptr().swap(*this); }
void
- swap(__weak_ptr& __s) // never throws
+ swap(__weak_ptr& __s) noexcept
{
std::swap(_M_ptr, __s._M_ptr);
_M_refcount._M_swap(__s._M_refcount);
@@ -1322,7 +1328,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
private:
// Used by __enable_shared_from_this.
void
- _M_assign(_Tp* __ptr, const __shared_count<_Lp>& __refcount)
+ _M_assign(_Tp* __ptr, const __shared_count<_Lp>& __refcount) noexcept
{
_M_ptr = __ptr;
_M_refcount = __refcount;
@@ -1340,7 +1346,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
// 20.8.13.3.7 weak_ptr specialized algorithms.
template<typename _Tp, _Lock_policy _Lp>
inline void
- swap(__weak_ptr<_Tp, _Lp>& __a, __weak_ptr<_Tp, _Lp>& __b)
+ swap(__weak_ptr<_Tp, _Lp>& __a, __weak_ptr<_Tp, _Lp>& __b) noexcept
{ __a.swap(__b); }
template<typename _Tp, typename _Tp1>
@@ -1374,12 +1380,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
class __enable_shared_from_this
{
protected:
- constexpr __enable_shared_from_this() { }
+ constexpr __enable_shared_from_this() noexcept { }
- __enable_shared_from_this(const __enable_shared_from_this&) { }
+ __enable_shared_from_this(const __enable_shared_from_this&) noexcept { }
__enable_shared_from_this&
- operator=(const __enable_shared_from_this&)
+ operator=(const __enable_shared_from_this&) noexcept
{ return *this; }
~__enable_shared_from_this() { }
@@ -1396,14 +1402,14 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
private:
template<typename _Tp1>
void
- _M_weak_assign(_Tp1* __p, const __shared_count<_Lp>& __n) const
+ _M_weak_assign(_Tp1* __p, const __shared_count<_Lp>& __n) const noexcept
{ _M_weak_this._M_assign(__p, __n); }
template<typename _Tp1>
friend void
__enable_shared_from_this_helper(const __shared_count<_Lp>& __pn,
const __enable_shared_from_this* __pe,
- const _Tp1* __px)
+ const _Tp1* __px) noexcept
{
if (__pe != 0)
__pe->_M_weak_assign(const_cast<_Tp1*>(__px), __pn);
diff --git a/libstdc++-v3/include/bits/stl_pair.h b/libstdc++-v3/include/bits/stl_pair.h
index 8d137b29a13..e2fc16deae5 100644
--- a/libstdc++-v3/include/bits/stl_pair.h
+++ b/libstdc++-v3/include/bits/stl_pair.h
@@ -1,6 +1,7 @@
// Pair implementation -*- C++ -*-
-// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
+// Copyright (C) 2001, 2002, 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
@@ -152,6 +153,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
pair&
operator=(pair&& __p)
+ noexcept(is_nothrow_move_assignable<_T1>::value
+ && is_nothrow_move_assignable<_T2>::value)
{
first = std::move(__p.first);
second = std::move(__p.second);
@@ -178,6 +181,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
void
swap(pair& __p)
+ noexcept(noexcept(swap(first, __p.first))
+ && noexcept(swap(second, __p.second)))
{
using std::swap;
swap(first, __p.first);
@@ -239,6 +244,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
template<class _T1, class _T2>
inline void
swap(pair<_T1, _T2>& __x, pair<_T1, _T2>& __y)
+ noexcept(noexcept(__x.swap(__y)))
{ __x.swap(__y); }
#endif
diff --git a/libstdc++-v3/include/debug/bitset b/libstdc++-v3/include/debug/bitset
index c1875454255..21d281787ad 100644
--- a/libstdc++-v3/include/debug/bitset
+++ b/libstdc++-v3/include/debug/bitset
@@ -1,6 +1,6 @@
// Debugging bitset 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
@@ -66,19 +66,19 @@ namespace __debug
reference();
reference(const _Base_ref& __base,
- bitset* __seq __attribute__((__unused__)))
+ bitset* __seq __attribute__((__unused__))) _GLIBCXX_NOEXCEPT
: _Base_ref(__base)
, _Safe_iterator_base(__seq, false)
{ }
public:
- reference(const reference& __x)
+ reference(const reference& __x) _GLIBCXX_NOEXCEPT
: _Base_ref(__x)
, _Safe_iterator_base(__x, false)
{ }
reference&
- operator=(bool __x)
+ operator=(bool __x) _GLIBCXX_NOEXCEPT
{
_GLIBCXX_DEBUG_VERIFY(! this->_M_singular(),
_M_message(__gnu_debug::__msg_bad_bitset_write)
@@ -88,7 +88,7 @@ namespace __debug
}
reference&
- operator=(const reference& __x)
+ operator=(const reference& __x) _GLIBCXX_NOEXCEPT
{
_GLIBCXX_DEBUG_VERIFY(! __x._M_singular(),
_M_message(__gnu_debug::__msg_bad_bitset_read)
@@ -101,7 +101,7 @@ namespace __debug
}
bool
- operator~() const
+ operator~() const _GLIBCXX_NOEXCEPT
{
_GLIBCXX_DEBUG_VERIFY(! this->_M_singular(),
_M_message(__gnu_debug::__msg_bad_bitset_read)
@@ -109,7 +109,7 @@ namespace __debug
return ~(*static_cast<const _Base_ref*>(this));
}
- operator bool() const
+ operator bool() const _GLIBCXX_NOEXCEPT
{
_GLIBCXX_DEBUG_VERIFY(! this->_M_singular(),
_M_message(__gnu_debug::__msg_bad_bitset_read)
@@ -118,7 +118,7 @@ namespace __debug
}
reference&
- flip()
+ flip() _GLIBCXX_NOEXCEPT
{
_GLIBCXX_DEBUG_VERIFY(! this->_M_singular(),
_M_message(__gnu_debug::__msg_bad_bitset_flip)
@@ -130,10 +130,11 @@ namespace __debug
#endif
// 23.3.5.1 constructors:
- _GLIBCXX_CONSTEXPR bitset() : _Base() { }
+ _GLIBCXX_CONSTEXPR bitset() _GLIBCXX_NOEXCEPT
+ : _Base() { }
#ifdef __GXX_EXPERIMENTAL_CXX0X__
- constexpr bitset(unsigned long long __val)
+ constexpr bitset(unsigned long long __val) noexcept
#else
bitset(unsigned long __val)
#endif
@@ -173,42 +174,42 @@ namespace __debug
// 23.3.5.2 bitset operations:
bitset<_Nb>&
- operator&=(const bitset<_Nb>& __rhs)
+ operator&=(const bitset<_Nb>& __rhs) _GLIBCXX_NOEXCEPT
{
_M_base() &= __rhs;
return *this;
}
bitset<_Nb>&
- operator|=(const bitset<_Nb>& __rhs)
+ operator|=(const bitset<_Nb>& __rhs) _GLIBCXX_NOEXCEPT
{
_M_base() |= __rhs;
return *this;
}
bitset<_Nb>&
- operator^=(const bitset<_Nb>& __rhs)
+ operator^=(const bitset<_Nb>& __rhs) _GLIBCXX_NOEXCEPT
{
_M_base() ^= __rhs;
return *this;
}
bitset<_Nb>&
- operator<<=(size_t __pos)
+ operator<<=(size_t __pos) _GLIBCXX_NOEXCEPT
{
_M_base() <<= __pos;
return *this;
}
bitset<_Nb>&
- operator>>=(size_t __pos)
+ operator>>=(size_t __pos) _GLIBCXX_NOEXCEPT
{
_M_base() >>= __pos;
return *this;
}
bitset<_Nb>&
- set()
+ set() _GLIBCXX_NOEXCEPT
{
_Base::set();
return *this;
@@ -224,7 +225,7 @@ namespace __debug
}
bitset<_Nb>&
- reset()
+ reset() _GLIBCXX_NOEXCEPT
{
_Base::reset();
return *this;
@@ -237,10 +238,12 @@ namespace __debug
return *this;
}
- bitset<_Nb> operator~() const { return bitset(~_M_base()); }
+ bitset<_Nb>
+ operator~() const _GLIBCXX_NOEXCEPT
+ { return bitset(~_M_base()); }
bitset<_Nb>&
- flip()
+ flip() _GLIBCXX_NOEXCEPT
{
_Base::flip();
return *this;
@@ -346,11 +349,11 @@ namespace __debug
using _Base::size;
bool
- operator==(const bitset<_Nb>& __rhs) const
+ operator==(const bitset<_Nb>& __rhs) const _GLIBCXX_NOEXCEPT
{ return _M_base() == __rhs; }
bool
- operator!=(const bitset<_Nb>& __rhs) const
+ operator!=(const bitset<_Nb>& __rhs) const _GLIBCXX_NOEXCEPT
{ return _M_base() != __rhs; }
using _Base::test;
@@ -359,33 +362,35 @@ namespace __debug
using _Base::none;
bitset<_Nb>
- operator<<(size_t __pos) const
+ operator<<(size_t __pos) const _GLIBCXX_NOEXCEPT
{ return bitset<_Nb>(_M_base() << __pos); }
bitset<_Nb>
- operator>>(size_t __pos) const
+ operator>>(size_t __pos) const _GLIBCXX_NOEXCEPT
{ return bitset<_Nb>(_M_base() >> __pos); }
- _Base&
- _M_base() { return *this; }
+ _Base&
+ _M_base() _GLIBCXX_NOEXCEPT
+ { return *this; }
const _Base&
- _M_base() const { return *this; }
+ _M_base() const _GLIBCXX_NOEXCEPT
+ { return *this; }
};
template<size_t _Nb>
bitset<_Nb>
- operator&(const bitset<_Nb>& __x, const bitset<_Nb>& __y)
+ operator&(const bitset<_Nb>& __x, const bitset<_Nb>& __y) _GLIBCXX_NOEXCEPT
{ return bitset<_Nb>(__x) &= __y; }
template<size_t _Nb>
bitset<_Nb>
- operator|(const bitset<_Nb>& __x, const bitset<_Nb>& __y)
+ operator|(const bitset<_Nb>& __x, const bitset<_Nb>& __y) _GLIBCXX_NOEXCEPT
{ return bitset<_Nb>(__x) |= __y; }
template<size_t _Nb>
bitset<_Nb>
- operator^(const bitset<_Nb>& __x, const bitset<_Nb>& __y)
+ operator^(const bitset<_Nb>& __x, const bitset<_Nb>& __y) _GLIBCXX_NOEXCEPT
{ return bitset<_Nb>(__x) ^= __y; }
template<typename _CharT, typename _Traits, size_t _Nb>
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/basic_tree_policy/traits.hpp b/libstdc++-v3/include/ext/pb_ds/detail/basic_tree_policy/traits.hpp
index b30829a8134..d245127c875 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/basic_tree_policy/traits.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/basic_tree_policy/traits.hpp
@@ -41,6 +41,12 @@
#ifndef PB_DS_NODE_AND_IT_TRAITS_HPP
#define PB_DS_NODE_AND_IT_TRAITS_HPP
+#define PB_DS_DEBUG_VERIFY(_Cond) \
+ _GLIBCXX_DEBUG_VERIFY_AT(_Cond, \
+ _M_message(#_Cond" assertion from %1;:%2;") \
+ ._M_string(__FILE__)._M_integer(__LINE__) \
+ ,__file,__line)
+
#include <ext/pb_ds/detail/types_traits.hpp>
#include <ext/pb_ds/detail/bin_search_tree_/traits.hpp>
#include <ext/pb_ds/detail/tree_policy/node_metadata_selector.hpp>
@@ -81,5 +87,6 @@ namespace __gnu_pbds
#include <ext/pb_ds/detail/splay_tree_/traits.hpp>
#include <ext/pb_ds/detail/ov_tree_map_/traits.hpp>
#include <ext/pb_ds/detail/pat_trie_/traits.hpp>
+#undef PB_DS_DEBUG_VERIFY
#endif // #ifndef PB_DS_NODE_AND_IT_TRAITS_HPP
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/bin_search_tree_/bin_search_tree_.hpp b/libstdc++-v3/include/ext/pb_ds/detail/bin_search_tree_/bin_search_tree_.hpp
index 8be0f80c5b2..a73414a0fcc 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/bin_search_tree_/bin_search_tree_.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/bin_search_tree_/bin_search_tree_.hpp
@@ -471,28 +471,12 @@ namespace __gnu_pbds
static node_allocator s_node_allocator;
};
-#define PB_DS_ASSERT_VALID(X) \
- _GLIBCXX_DEBUG_ONLY(X.assert_valid(__FILE__, __LINE__);)
-
#define PB_DS_STRUCT_ONLY_ASSERT_VALID(X) \
_GLIBCXX_DEBUG_ONLY(X.structure_only_assert_valid(__FILE__, __LINE__);)
#define PB_DS_ASSERT_NODE_CONSISTENT(_Node) \
_GLIBCXX_DEBUG_ONLY(assert_node_consistent(_Node, __FILE__, __LINE__);)
-#define PB_DS_CHECK_KEY_EXISTS(_Key) \
- _GLIBCXX_DEBUG_ONLY(debug_base::check_key_exists(_Key, __FILE__, __LINE__);)
-
-#define PB_DS_CHECK_KEY_DOES_NOT_EXIST(_Key) \
- _GLIBCXX_DEBUG_ONLY(debug_base::check_key_does_not_exist(_Key, \
- __FILE__, __LINE__);)
-
-#define PB_DS_DEBUG_VERIFY(_Cond) \
- _GLIBCXX_DEBUG_VERIFY_AT(_Cond, \
- _M_message(#_Cond" assertion from %1;:%2;") \
- ._M_string(__FILE__)._M_integer(__LINE__) \
- ,__file,__line)
-
#include <ext/pb_ds/detail/bin_search_tree_/constructors_destructor_fn_imps.hpp>
#include <ext/pb_ds/detail/bin_search_tree_/iterators_fn_imps.hpp>
#include <ext/pb_ds/detail/bin_search_tree_/debug_fn_imps.hpp>
@@ -504,12 +488,8 @@ namespace __gnu_pbds
#include <ext/pb_ds/detail/bin_search_tree_/rotate_fn_imps.hpp>
#include <ext/pb_ds/detail/bin_search_tree_/policy_access_fn_imps.hpp>
-#undef PB_DS_DEBUG_VERIFY
-#undef PB_DS_CHECK_KEY_DOES_NOT_EXIST
-#undef PB_DS_CHECK_KEY_EXISTS
#undef PB_DS_ASSERT_NODE_CONSISTENT
#undef PB_DS_STRUCT_ONLY_ASSERT_VALID
-#undef PB_DS_ASSERT_VALID
#undef PB_DS_CLASS_C_DEC
#undef PB_DS_CLASS_T_DEC
#undef PB_DS_CLASS_NAME
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/binary_heap_/binary_heap_.hpp b/libstdc++-v3/include/ext/pb_ds/detail/binary_heap_/binary_heap_.hpp
index e728e20c6c1..4d65d2b6826 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/binary_heap_/binary_heap_.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/binary_heap_/binary_heap_.hpp
@@ -335,15 +335,6 @@ namespace __gnu_pbds
entry_pointer m_a_entries;
};
-#define PB_DS_ASSERT_VALID(X) \
- _GLIBCXX_DEBUG_ONLY(X.assert_valid(__FILE__, __LINE__);)
-
-#define PB_DS_DEBUG_VERIFY(_Cond) \
- _GLIBCXX_DEBUG_VERIFY_AT(_Cond, \
- _M_message(#_Cond" assertion from %1;:%2;") \
- ._M_string(__FILE__)._M_integer(__LINE__) \
- ,__file,__line)
-
#include <ext/pb_ds/detail/binary_heap_/insert_fn_imps.hpp>
#include <ext/pb_ds/detail/binary_heap_/constructors_destructor_fn_imps.hpp>
#include <ext/pb_ds/detail/binary_heap_/iterators_fn_imps.hpp>
@@ -355,8 +346,6 @@ namespace __gnu_pbds
#include <ext/pb_ds/detail/binary_heap_/split_join_fn_imps.hpp>
#include <ext/pb_ds/detail/binary_heap_/policy_access_fn_imps.hpp>
-#undef PB_DS_DEBUG_VERIFY
-#undef PB_DS_ASSERT_VALID
#undef PB_DS_CLASS_C_DEC
#undef PB_DS_CLASS_T_DEC
#undef PB_DS_ENTRY_CMP_DEC
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/binary_heap_/resize_policy.hpp b/libstdc++-v3/include/ext/pb_ds/detail/binary_heap_/resize_policy.hpp
index e1961272f73..c5893872e5c 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/binary_heap_/resize_policy.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/binary_heap_/resize_policy.hpp
@@ -52,15 +52,6 @@ namespace __gnu_pbds
#define PB_DS_CLASS_C_DEC resize_policy<Size_Type>
-#define PB_DS_ASSERT_VALID(X)\
- _GLIBCXX_DEBUG_ONLY(X.assert_valid(__FILE__, __LINE__);)
-
-#define PB_DS_DEBUG_VERIFY(_Cond) \
- _GLIBCXX_DEBUG_VERIFY_AT(_Cond, \
- _M_message(#_Cond" assertion from %1;:%2;") \
- ._M_string(__FILE__)._M_integer(__LINE__) \
- ,__file,__line)
-
template<typename Size_Type>
class resize_policy
{
@@ -253,8 +244,6 @@ namespace __gnu_pbds
}
#endif
-#undef PB_DS_DEBUG_VERIFY
-#undef PB_DS_ASSERT_VALID
#undef PB_DS_CLASS_T_DEC
#undef PB_DS_CLASS_C_DEC
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/binomial_heap_/binomial_heap_.hpp b/libstdc++-v3/include/ext/pb_ds/detail/binomial_heap_/binomial_heap_.hpp
index c618a555afe..a6d6098fd37 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/binomial_heap_/binomial_heap_.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/binomial_heap_/binomial_heap_.hpp
@@ -104,13 +104,9 @@ namespace __gnu_pbds
#endif
};
-#define PB_DS_ASSERT_VALID(X) \
- _GLIBCXX_DEBUG_ONLY(X.assert_valid(__FILE__, __LINE__);)
-
#include <ext/pb_ds/detail/binomial_heap_/constructors_destructor_fn_imps.hpp>
#include <ext/pb_ds/detail/binomial_heap_/debug_fn_imps.hpp>
-#undef PB_DS_ASSERT_VALID
#undef PB_DS_CLASS_C_DEC
#undef PB_DS_CLASS_T_DEC
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/binomial_heap_base_/binomial_heap_base_.hpp b/libstdc++-v3/include/ext/pb_ds/detail/binomial_heap_base_/binomial_heap_base_.hpp
index 0a1af721e10..b2add18e7a0 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/binomial_heap_base_/binomial_heap_base_.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/binomial_heap_base_/binomial_heap_base_.hpp
@@ -217,19 +217,13 @@ namespace __gnu_pbds
node_pointer m_p_max;
};
-#define PB_DS_ASSERT_VALID(X, _StrictlyBinomial) \
+#define PB_DS_ASSERT_VALID_COND(X, _StrictlyBinomial) \
_GLIBCXX_DEBUG_ONLY(X.assert_valid(_StrictlyBinomial,__FILE__, __LINE__);)
#define PB_DS_ASSERT_BASE_NODE_CONSISTENT(_Node, _Bool) \
_GLIBCXX_DEBUG_ONLY(base_type::assert_node_consistent(_Node, _Bool, \
__FILE__, __LINE__);)
-#define PB_DS_DEBUG_VERIFY(_Cond) \
- _GLIBCXX_DEBUG_VERIFY_AT(_Cond, \
- _M_message(#_Cond" assertion from %1;:%2;") \
- ._M_string(__FILE__)._M_integer(__LINE__) \
- ,__file,__line)
-
#include <ext/pb_ds/detail/binomial_heap_base_/constructors_destructor_fn_imps.hpp>
#include <ext/pb_ds/detail/binomial_heap_base_/debug_fn_imps.hpp>
#include <ext/pb_ds/detail/binomial_heap_base_/find_fn_imps.hpp>
@@ -237,9 +231,8 @@ namespace __gnu_pbds
#include <ext/pb_ds/detail/binomial_heap_base_/erase_fn_imps.hpp>
#include <ext/pb_ds/detail/binomial_heap_base_/split_join_fn_imps.hpp>
-#undef PB_DS_DEBUG_VERIFY
#undef PB_DS_ASSERT_BASE_NODE_CONSISTENT
-#undef PB_DS_ASSERT_VALID
+#undef PB_DS_ASSERT_VALID_COND
#undef PB_DS_CLASS_C_DEC
#undef PB_DS_CLASS_T_DEC
#undef PB_DS_BASE_C_DEC
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/binomial_heap_base_/constructors_destructor_fn_imps.hpp b/libstdc++-v3/include/ext/pb_ds/detail/binomial_heap_base_/constructors_destructor_fn_imps.hpp
index 3e6df18ddca..fa86c230cd2 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/binomial_heap_base_/constructors_destructor_fn_imps.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/binomial_heap_base_/constructors_destructor_fn_imps.hpp
@@ -47,7 +47,7 @@ copy_from_range(It first_it, It last_it)
while (first_it != last_it)
push(*(first_it++));
- PB_DS_ASSERT_VALID((*this),false)
+ PB_DS_ASSERT_VALID_COND((*this),false)
}
PB_DS_CLASS_T_DEC
@@ -55,7 +55,7 @@ PB_DS_CLASS_C_DEC::
binomial_heap_base_() :
m_p_max(0)
{
- PB_DS_ASSERT_VALID((*this),false)
+ PB_DS_ASSERT_VALID_COND((*this),false)
}
PB_DS_CLASS_T_DEC
@@ -64,7 +64,7 @@ binomial_heap_base_(const Cmp_Fn& r_cmp_fn) :
PB_DS_BASE_C_DEC(r_cmp_fn),
m_p_max(0)
{
- PB_DS_ASSERT_VALID((*this),false)
+ PB_DS_ASSERT_VALID_COND((*this),false)
}
PB_DS_CLASS_T_DEC
@@ -73,7 +73,7 @@ binomial_heap_base_(const PB_DS_CLASS_C_DEC& other) :
PB_DS_BASE_C_DEC(other),
m_p_max(0)
{
- PB_DS_ASSERT_VALID((*this),false)
+ PB_DS_ASSERT_VALID_COND((*this),false)
}
PB_DS_CLASS_T_DEC
@@ -81,13 +81,13 @@ void
PB_DS_CLASS_C_DEC::
swap(PB_DS_CLASS_C_DEC& other)
{
- PB_DS_ASSERT_VALID((*this),false)
+ PB_DS_ASSERT_VALID_COND((*this),false)
base_type::swap(other);
std::swap(m_p_max, other.m_p_max);
- PB_DS_ASSERT_VALID((*this),false)
+ PB_DS_ASSERT_VALID_COND((*this),false)
}
PB_DS_CLASS_T_DEC
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/binomial_heap_base_/erase_fn_imps.hpp b/libstdc++-v3/include/ext/pb_ds/detail/binomial_heap_base_/erase_fn_imps.hpp
index 05c8e075b17..e7a2dc4f6fd 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/binomial_heap_base_/erase_fn_imps.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/binomial_heap_base_/erase_fn_imps.hpp
@@ -43,7 +43,7 @@ void
PB_DS_CLASS_C_DEC::
pop()
{
- PB_DS_ASSERT_VALID((*this),true)
+ PB_DS_ASSERT_VALID_COND((*this),true)
_GLIBCXX_DEBUG_ASSERT(!base_type::empty());
if (m_p_max == 0)
@@ -59,7 +59,7 @@ pop()
m_p_max = 0;
- PB_DS_ASSERT_VALID((*this),true)
+ PB_DS_ASSERT_VALID_COND((*this),true)
}
PB_DS_CLASS_T_DEC
@@ -113,7 +113,7 @@ void
PB_DS_CLASS_C_DEC::
erase(point_iterator it)
{
- PB_DS_ASSERT_VALID((*this),true)
+ PB_DS_ASSERT_VALID_COND((*this),true)
_GLIBCXX_DEBUG_ASSERT(!base_type::empty());
base_type::bubble_to_top(it.m_p_nd);
@@ -124,7 +124,7 @@ erase(point_iterator it)
m_p_max = 0;
- PB_DS_ASSERT_VALID((*this),true)
+ PB_DS_ASSERT_VALID_COND((*this),true)
}
PB_DS_CLASS_T_DEC
@@ -133,11 +133,11 @@ typename PB_DS_CLASS_C_DEC::size_type
PB_DS_CLASS_C_DEC::
erase_if(Pred pred)
{
- PB_DS_ASSERT_VALID((*this),true)
+ PB_DS_ASSERT_VALID_COND((*this),true)
if (base_type::empty())
{
- PB_DS_ASSERT_VALID((*this),true)
+ PB_DS_ASSERT_VALID_COND((*this),true)
return 0;
}
@@ -185,7 +185,7 @@ erase_if(Pred pred)
m_p_max = 0;
- PB_DS_ASSERT_VALID((*this),true)
+ PB_DS_ASSERT_VALID_COND((*this),true)
return ersd;
}
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/binomial_heap_base_/find_fn_imps.hpp b/libstdc++-v3/include/ext/pb_ds/detail/binomial_heap_base_/find_fn_imps.hpp
index 3f300dca290..f832cb60c7d 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/binomial_heap_base_/find_fn_imps.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/binomial_heap_base_/find_fn_imps.hpp
@@ -43,7 +43,7 @@ inline typename PB_DS_CLASS_C_DEC::const_reference
PB_DS_CLASS_C_DEC::
top() const
{
- PB_DS_ASSERT_VALID((*this),false)
+ PB_DS_ASSERT_VALID_COND((*this),false)
_GLIBCXX_DEBUG_ASSERT(!base_type::empty());
if (m_p_max == 0)
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/binomial_heap_base_/insert_fn_imps.hpp b/libstdc++-v3/include/ext/pb_ds/detail/binomial_heap_base_/insert_fn_imps.hpp
index 2d40cd4fd15..11bd5e1444f 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/binomial_heap_base_/insert_fn_imps.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/binomial_heap_base_/insert_fn_imps.hpp
@@ -43,7 +43,7 @@ inline typename PB_DS_CLASS_C_DEC::point_iterator
PB_DS_CLASS_C_DEC::
push(const_reference r_val)
{
- PB_DS_ASSERT_VALID((*this),true)
+ PB_DS_ASSERT_VALID_COND((*this),true)
node_pointer p_nd = base_type::get_new_node_for_insert(r_val);
@@ -51,7 +51,7 @@ push(const_reference r_val)
m_p_max = 0;
- PB_DS_ASSERT_VALID((*this),true)
+ PB_DS_ASSERT_VALID_COND((*this),true)
return point_iterator(p_nd);
}
@@ -171,7 +171,7 @@ void
PB_DS_CLASS_C_DEC::
modify(point_iterator it, const_reference r_new_val)
{
- PB_DS_ASSERT_VALID((*this),true)
+ PB_DS_ASSERT_VALID_COND((*this),true)
node_pointer p_nd = it.m_p_nd;
_GLIBCXX_DEBUG_ASSERT(p_nd != 0);
@@ -198,7 +198,7 @@ modify(point_iterator it, const_reference r_new_val)
m_p_max = 0;
- PB_DS_ASSERT_VALID((*this),true)
+ PB_DS_ASSERT_VALID_COND((*this),true)
return;
}
@@ -211,6 +211,6 @@ modify(point_iterator it, const_reference r_new_val)
m_p_max = 0;
- PB_DS_ASSERT_VALID((*this),true)
+ PB_DS_ASSERT_VALID_COND((*this),true)
}
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/binomial_heap_base_/split_join_fn_imps.hpp b/libstdc++-v3/include/ext/pb_ds/detail/binomial_heap_base_/split_join_fn_imps.hpp
index 405e59385dd..6564c54a21a 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/binomial_heap_base_/split_join_fn_imps.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/binomial_heap_base_/split_join_fn_imps.hpp
@@ -44,15 +44,15 @@ void
PB_DS_CLASS_C_DEC::
split(Pred pred, PB_DS_CLASS_C_DEC& other)
{
- PB_DS_ASSERT_VALID((*this),true)
- PB_DS_ASSERT_VALID(other,true)
+ PB_DS_ASSERT_VALID_COND((*this),true)
+ PB_DS_ASSERT_VALID_COND(other,true)
other.clear();
if (base_type::empty())
{
- PB_DS_ASSERT_VALID((*this),true)
- PB_DS_ASSERT_VALID(other,true)
+ PB_DS_ASSERT_VALID_COND((*this),true)
+ PB_DS_ASSERT_VALID_COND(other,true)
return;
}
@@ -86,7 +86,7 @@ split(Pred pred, PB_DS_CLASS_C_DEC& other)
p_out = p_next;
}
- PB_DS_ASSERT_VALID(other,true)
+ PB_DS_ASSERT_VALID_COND(other,true)
node_pointer p_cur = base_type::m_p_root;
@@ -114,8 +114,8 @@ split(Pred pred, PB_DS_CLASS_C_DEC& other)
m_p_max = 0;
- PB_DS_ASSERT_VALID((*this),true)
- PB_DS_ASSERT_VALID(other,true)
+ PB_DS_ASSERT_VALID_COND((*this),true)
+ PB_DS_ASSERT_VALID_COND(other,true)
}
PB_DS_CLASS_T_DEC
@@ -123,8 +123,8 @@ inline void
PB_DS_CLASS_C_DEC::
join(PB_DS_CLASS_C_DEC& other)
{
- PB_DS_ASSERT_VALID((*this),true)
- PB_DS_ASSERT_VALID(other,true)
+ PB_DS_ASSERT_VALID_COND((*this),true)
+ PB_DS_ASSERT_VALID_COND(other,true)
node_pointer p_other = other.m_p_root;
@@ -147,8 +147,8 @@ join(PB_DS_CLASS_C_DEC& other)
other.m_size = 0;
other.m_p_max = 0;
- PB_DS_ASSERT_VALID((*this),true)
- PB_DS_ASSERT_VALID(other,true)
+ PB_DS_ASSERT_VALID_COND((*this),true)
+ PB_DS_ASSERT_VALID_COND(other,true)
}
PB_DS_CLASS_T_DEC
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/cc_hash_table_map_/cc_ht_map_.hpp b/libstdc++-v3/include/ext/pb_ds/detail/cc_hash_table_map_/cc_ht_map_.hpp
index 47abe513508..149a206a4e7 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/cc_hash_table_map_/cc_ht_map_.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/cc_hash_table_map_/cc_ht_map_.hpp
@@ -101,14 +101,6 @@ namespace __gnu_pbds
#define PB_DS_V2S(X) Mapped_Data()
#endif
-#define PB_DS_CHECK_KEY_EXISTS(_Key) \
- _GLIBCXX_DEBUG_ONLY(debug_base::check_key_exists(_Key, __FILE__, __LINE__);)
-
-#define PB_DS_CHECK_KEY_DOES_NOT_EXIST(_Key) \
- _GLIBCXX_DEBUG_ONLY(debug_base::check_key_does_not_exist(_Key, \
- __FILE__, __LINE__);)
-
-
// <011i$i0|\|-<|-|4i|\|i|\|g |-|4$|-| 74813.
template<typename Key,
typename Mapped,
@@ -621,15 +613,6 @@ namespace __gnu_pbds
PB_DS_STATIC_ASSERT(sth, store_hash_ok);
};
-#define PB_DS_ASSERT_VALID(X) \
- _GLIBCXX_DEBUG_ONLY(X.assert_valid(__FILE__, __LINE__);)
-
-#define PB_DS_DEBUG_VERIFY(_Cond) \
- _GLIBCXX_DEBUG_VERIFY_AT(_Cond, \
- _M_message(#_Cond" assertion from %1;:%2;") \
- ._M_string(__FILE__)._M_integer(__LINE__) \
- ,__file,__line)
-
#include <ext/pb_ds/detail/cc_hash_table_map_/constructor_destructor_fn_imps.hpp>
#include <ext/pb_ds/detail/cc_hash_table_map_/entry_list_fn_imps.hpp>
#include <ext/pb_ds/detail/cc_hash_table_map_/find_fn_imps.hpp>
@@ -642,10 +625,6 @@ namespace __gnu_pbds
#include <ext/pb_ds/detail/cc_hash_table_map_/insert_fn_imps.hpp>
#include <ext/pb_ds/detail/cc_hash_table_map_/trace_fn_imps.hpp>
-#undef PB_DS_DEBUG_VERIFY
-#undef PB_DS_ASSERT_VALID
-#undef PB_DS_CHECK_KEY_DOES_NOT_EXIST
-#undef PB_DS_CHECK_KEY_EXISTS
#undef PB_DS_CLASS_T_DEC
#undef PB_DS_CLASS_C_DEC
#undef PB_DS_HASH_EQ_FN_C_DEC
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/container_base_dispatch.hpp b/libstdc++-v3/include/ext/pb_ds/detail/container_base_dispatch.hpp
index 7f8d87a3c25..2964b2d30c6 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/container_base_dispatch.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/container_base_dispatch.hpp
@@ -43,6 +43,22 @@
#include <ext/typelist.h>
+#define PB_DS_ASSERT_VALID(X) \
+ _GLIBCXX_DEBUG_ONLY(X.assert_valid(__FILE__, __LINE__);)
+
+#define PB_DS_DEBUG_VERIFY(_Cond) \
+ _GLIBCXX_DEBUG_VERIFY_AT(_Cond, \
+ _M_message(#_Cond" assertion from %1;:%2;") \
+ ._M_string(__FILE__)._M_integer(__LINE__) \
+ ,__file,__line)
+
+#define PB_DS_CHECK_KEY_EXISTS(_Key) \
+ _GLIBCXX_DEBUG_ONLY(debug_base::check_key_exists(_Key, __FILE__, __LINE__);)
+
+#define PB_DS_CHECK_KEY_DOES_NOT_EXIST(_Key) \
+ _GLIBCXX_DEBUG_ONLY(debug_base::check_key_does_not_exist(_Key, \
+ __FILE__, __LINE__);)
+
#define PB_DS_DATA_TRUE_INDICATOR
#include <ext/pb_ds/detail/list_update_map_/lu_map_.hpp>
#undef PB_DS_DATA_TRUE_INDICATOR
@@ -99,6 +115,11 @@
#include <ext/pb_ds/detail/pat_trie_/pat_trie_.hpp>
#undef PB_DS_DATA_FALSE_INDICATOR
+#undef PB_DS_CHECK_KEY_DOES_NOT_EXIST
+#undef PB_DS_CHECK_KEY_EXISTS
+#undef PB_DS_DEBUG_VERIFY
+#undef PB_DS_ASSERT_VALID
+
namespace __gnu_pbds
{
namespace detail
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/debug_map_base.hpp b/libstdc++-v3/include/ext/pb_ds/detail/debug_map_base.hpp
index 1ade7957b66..a9a0b42d263 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/debug_map_base.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/debug_map_base.hpp
@@ -51,15 +51,6 @@
#include <ext/throw_allocator.h>
#include <debug/debug.h>
-#define PB_DS_ASSERT_VALID(X) \
- _GLIBCXX_DEBUG_ONLY(X.assert_valid(__FILE__, __LINE__);)
-
-#define PB_DS_DEBUG_VERIFY(_Cond) \
- _GLIBCXX_DEBUG_VERIFY_AT(_Cond, \
- _M_message(#_Cond" assertion from %1;:%2;") \
- ._M_string(__FILE__)._M_integer(__LINE__) \
- ,__file,__line)
-
namespace __gnu_pbds
{
namespace detail
@@ -356,8 +347,6 @@ namespace __gnu_pbds
} // namespace detail
} // namespace __gnu_pbds
-#undef PB_DS_DEBUG_VERIFY
-#undef PB_DS_ASSERT_VALID
#endif
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/gp_hash_table_map_/gp_ht_map_.hpp b/libstdc++-v3/include/ext/pb_ds/detail/gp_hash_table_map_/gp_ht_map_.hpp
index ef3be7bd054..a9179d5363d 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/gp_hash_table_map_/gp_ht_map_.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/gp_hash_table_map_/gp_ht_map_.hpp
@@ -98,13 +98,6 @@ namespace __gnu_pbds
#define PB_DS_V2S(X) Mapped()
#endif
-#define PB_DS_CHECK_KEY_EXISTS(_Key) \
- _GLIBCXX_DEBUG_ONLY(debug_base::check_key_exists(_Key, __FILE__, __LINE__);)
-
-#define PB_DS_CHECK_KEY_DOES_NOT_EXIST(_Key) \
- _GLIBCXX_DEBUG_ONLY(debug_base::check_key_does_not_exist(_Key, \
- __FILE__, __LINE__);)
-
template<typename Key,
typename Mapped,
typename Hash_Fn,
@@ -658,15 +651,6 @@ namespace __gnu_pbds
PB_DS_STATIC_ASSERT(sth, store_hash_ok);
};
-#define PB_DS_ASSERT_VALID(X) \
- _GLIBCXX_DEBUG_ONLY(X.assert_valid(__FILE__, __LINE__);)
-
-#define PB_DS_DEBUG_VERIFY(_Cond) \
- _GLIBCXX_DEBUG_VERIFY_AT(_Cond, \
- _M_message(#_Cond" assertion from %1;:%2;") \
- ._M_string(__FILE__)._M_integer(__LINE__) \
- ,__file,__line)
-
#include <ext/pb_ds/detail/gp_hash_table_map_/constructor_destructor_fn_imps.hpp>
#include <ext/pb_ds/detail/gp_hash_table_map_/find_fn_imps.hpp>
#include <ext/pb_ds/detail/gp_hash_table_map_/resize_fn_imps.hpp>
@@ -678,10 +662,6 @@ namespace __gnu_pbds
#include <ext/pb_ds/detail/gp_hash_table_map_/insert_fn_imps.hpp>
#include <ext/pb_ds/detail/gp_hash_table_map_/trace_fn_imps.hpp>
-#undef PB_DS_DEBUG_VERIFY
-#undef PB_DS_ASSERT_VALID
-#undef PB_DS_CHECK_KEY_DOES_NOT_EXIST
-#undef PB_DS_CHECK_KEY_EXISTS
#undef PB_DS_CLASS_T_DEC
#undef PB_DS_CLASS_C_DEC
#undef PB_DS_HASH_EQ_FN_C_DEC
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/left_child_next_sibling_heap_/left_child_next_sibling_heap_.hpp b/libstdc++-v3/include/ext/pb_ds/detail/left_child_next_sibling_heap_/left_child_next_sibling_heap_.hpp
index b433f359209..d3115463810 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/left_child_next_sibling_heap_/left_child_next_sibling_heap_.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/left_child_next_sibling_heap_/left_child_next_sibling_heap_.hpp
@@ -332,15 +332,6 @@ namespace __gnu_pbds
static no_throw_copies_t s_no_throw_copies_ind;
};
-#define PB_DS_ASSERT_VALID(X) \
- _GLIBCXX_DEBUG_ONLY(X.assert_valid(__FILE__, __LINE__);)
-
-#define PB_DS_DEBUG_VERIFY(_Cond) \
- _GLIBCXX_DEBUG_VERIFY_AT(_Cond, \
- _M_message(#_Cond" assertion from %1;:%2;") \
- ._M_string(__FILE__)._M_integer(__LINE__) \
- ,__file,__line)
-
#include <ext/pb_ds/detail/left_child_next_sibling_heap_/constructors_destructor_fn_imps.hpp>
#include <ext/pb_ds/detail/left_child_next_sibling_heap_/iterators_fn_imps.hpp>
#include <ext/pb_ds/detail/left_child_next_sibling_heap_/debug_fn_imps.hpp>
@@ -350,8 +341,6 @@ namespace __gnu_pbds
#include <ext/pb_ds/detail/left_child_next_sibling_heap_/info_fn_imps.hpp>
#include <ext/pb_ds/detail/left_child_next_sibling_heap_/policy_access_fn_imps.hpp>
-#undef PB_DS_DEBUG_VERIFY
-#undef PB_DS_ASSERT_VALID
#undef PB_DS_CLASS_C_DEC
#undef PB_DS_CLASS_T_DEC
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/list_update_map_/lu_map_.hpp b/libstdc++-v3/include/ext/pb_ds/detail/list_update_map_/lu_map_.hpp
index 2e2f6a20d51..329f2fa780a 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/list_update_map_/lu_map_.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/list_update_map_/lu_map_.hpp
@@ -337,22 +337,6 @@ namespace __gnu_pbds
mutable entry_pointer m_p_l;
};
-#define PB_DS_ASSERT_VALID(X) \
- _GLIBCXX_DEBUG_ONLY(X.assert_valid(__FILE__, __LINE__);)
-
-#define PB_DS_CHECK_KEY_EXISTS(_Key) \
- _GLIBCXX_DEBUG_ONLY(debug_base::check_key_exists(_Key, __FILE__, __LINE__);)
-
-#define PB_DS_CHECK_KEY_DOES_NOT_EXIST(_Key) \
- _GLIBCXX_DEBUG_ONLY(debug_base::check_key_does_not_exist(_Key, \
- __FILE__, __LINE__);)
-
-#define PB_DS_DEBUG_VERIFY(_Cond) \
- _GLIBCXX_DEBUG_VERIFY_AT(_Cond, \
- _M_message(#_Cond" assertion from %1;:%2;") \
- ._M_string(__FILE__)._M_integer(__LINE__) \
- ,__file,__line)
-
#include <ext/pb_ds/detail/list_update_map_/constructor_destructor_fn_imps.hpp>
#include <ext/pb_ds/detail/list_update_map_/info_fn_imps.hpp>
#include <ext/pb_ds/detail/list_update_map_/debug_fn_imps.hpp>
@@ -362,10 +346,6 @@ namespace __gnu_pbds
#include <ext/pb_ds/detail/list_update_map_/insert_fn_imps.hpp>
#include <ext/pb_ds/detail/list_update_map_/trace_fn_imps.hpp>
-#undef PB_DS_DEBUG_VERIFY
-#undef PB_DS_CHECK_KEY_DOES_NOT_EXIST
-#undef PB_DS_CHECK_KEY_EXISTS
-#undef PB_DS_ASSERT_VALID
#undef PB_DS_CLASS_T_DEC
#undef PB_DS_CLASS_C_DEC
#undef PB_DS_TYPES_TRAITS_C_DEC
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/ov_tree_map_/ov_tree_map_.hpp b/libstdc++-v3/include/ext/pb_ds/detail/ov_tree_map_/ov_tree_map_.hpp
index d6ba00b8856..06436591ef5 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/ov_tree_map_/ov_tree_map_.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/ov_tree_map_/ov_tree_map_.hpp
@@ -107,15 +107,9 @@ namespace __gnu_pbds
Cmp_Fn, false, Allocator>
#endif
-#define PB_DS_ASSERT_VALID(X) \
- _GLIBCXX_DEBUG_ONLY(X.assert_valid(__FILE__, __LINE__);)
-
-#define PB_DS_CHECK_KEY_EXISTS(_Key) \
- _GLIBCXX_DEBUG_ONLY(debug_base::check_key_exists(_Key, __FILE__, __LINE__);)
-
-#define PB_DS_CHECK_KEY_DOES_NOT_EXIST(_Key) \
- _GLIBCXX_DEBUG_ONLY(debug_base::check_key_does_not_exist(_Key, \
- __FILE__, __LINE__);)
+#ifndef PB_DS_CHECK_KEY_EXISTS
+# error Missing definition
+#endif
// Ordered-vector tree associative-container.
template<typename Key, typename Mapped, class Cmp_Fn,
@@ -502,12 +496,6 @@ namespace __gnu_pbds
size_type m_size;
};
-#define PB_DS_DEBUG_VERIFY(_Cond) \
- _GLIBCXX_DEBUG_VERIFY_AT(_Cond, \
- _M_message(#_Cond" assertion from %1;:%2;") \
- ._M_string(__FILE__)._M_integer(__LINE__) \
- ,__file,__line)
-
#include <ext/pb_ds/detail/ov_tree_map_/constructors_destructor_fn_imps.hpp>
#include <ext/pb_ds/detail/ov_tree_map_/iterators_fn_imps.hpp>
#include <ext/pb_ds/detail/ov_tree_map_/debug_fn_imps.hpp>
@@ -517,10 +505,6 @@ namespace __gnu_pbds
#include <ext/pb_ds/detail/ov_tree_map_/split_join_fn_imps.hpp>
#include <ext/pb_ds/detail/bin_search_tree_/policy_access_fn_imps.hpp>
-#undef PB_DS_DEBUG_VERIFY
-#undef PB_DS_CHECK_KEY_DOES_NOT_EXIST
-#undef PB_DS_CHECK_KEY_EXISTS
-#undef PB_DS_ASSERT_VALID
#undef PB_DS_CLASS_C_DEC
#undef PB_DS_CLASS_T_DEC
#undef PB_DS_OV_TREE_CLASS_NAME
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/pairing_heap_/pairing_heap_.hpp b/libstdc++-v3/include/ext/pb_ds/detail/pairing_heap_/pairing_heap_.hpp
index 6677cc0fb24..3bdb82fb649 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/pairing_heap_/pairing_heap_.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/pairing_heap_/pairing_heap_.hpp
@@ -198,19 +198,10 @@ namespace __gnu_pbds
remove_node(node_pointer p_nd);
};
-#define PB_DS_ASSERT_VALID(X) \
- _GLIBCXX_DEBUG_ONLY(X.assert_valid(__FILE__, __LINE__);)
-
#define PB_DS_ASSERT_NODE_CONSISTENT(_Node, _Bool) \
_GLIBCXX_DEBUG_ONLY(assert_node_consistent(_Node, _Bool, \
__FILE__, __LINE__);)
-#define PB_DS_DEBUG_VERIFY(_Cond) \
- _GLIBCXX_DEBUG_VERIFY_AT(_Cond, \
- _M_message(#_Cond" assertion from %1;:%2;") \
- ._M_string(__FILE__)._M_integer(__LINE__) \
- ,__file,__line)
-
#include <ext/pb_ds/detail/pairing_heap_/constructors_destructor_fn_imps.hpp>
#include <ext/pb_ds/detail/pairing_heap_/debug_fn_imps.hpp>
#include <ext/pb_ds/detail/pairing_heap_/find_fn_imps.hpp>
@@ -218,9 +209,7 @@ namespace __gnu_pbds
#include <ext/pb_ds/detail/pairing_heap_/erase_fn_imps.hpp>
#include <ext/pb_ds/detail/pairing_heap_/split_join_fn_imps.hpp>
-#undef PB_DS_DEBUG_VERIFY
#undef PB_DS_ASSERT_NODE_CONSISTENT
-#undef PB_DS_ASSERT_VALID
#undef PB_DS_CLASS_C_DEC
#undef PB_DS_CLASS_T_DEC
#undef PB_DS_BASE_C_DEC
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/internal_node.hpp b/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/internal_node.hpp
index 9e30e65cd12..cb8b6740d79 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/internal_node.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/internal_node.hpp
@@ -566,12 +566,6 @@ namespace __gnu_pbds
}
#ifdef _GLIBCXX_DEBUG
-# define PB_DS_DEBUG_VERIFY(_Cond) \
- _GLIBCXX_DEBUG_VERIFY_AT(_Cond, \
- _M_message(#_Cond" assertion from %1;:%2;") \
- ._M_string(__FILE__)._M_integer(__LINE__) \
- ,__file,__line)
-
PB_DS_CLASS_T_DEC
typename PB_DS_CLASS_C_DEC::subtree_debug_info
PB_DS_CLASS_C_DEC::
@@ -596,7 +590,6 @@ namespace __gnu_pbds
}
return std::make_pair(pref_b_it(), pref_e_it());
}
-# undef PB_DS_DEBUG_VERIFY
#endif
#undef PB_DS_CLASS_T_DEC
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/leaf.hpp b/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/leaf.hpp
index ba320434ca3..de8057a0219 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/leaf.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/leaf.hpp
@@ -140,12 +140,6 @@ namespace __gnu_pbds
{ return m_value; }
#ifdef _GLIBCXX_DEBUG
-# define PB_DS_DEBUG_VERIFY(_Cond) \
- _GLIBCXX_DEBUG_VERIFY_AT(_Cond, \
- _M_message(#_Cond" assertion from %1;:%2;") \
- ._M_string(__FILE__)._M_integer(__LINE__) \
- ,__file,__line)
-
PB_DS_CLASS_T_DEC
typename PB_DS_CLASS_C_DEC::subtree_debug_info
PB_DS_CLASS_C_DEC::
@@ -162,7 +156,6 @@ namespace __gnu_pbds
PB_DS_CLASS_T_DEC
PB_DS_CLASS_C_DEC::
~pat_trie_leaf() { }
-# undef PB_DS_DEBUG_VERIFY
#endif
#undef PB_DS_CLASS_T_DEC
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/pat_trie_.hpp b/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/pat_trie_.hpp
index 738420f13f9..5313c0b9712 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/pat_trie_.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/pat_trie_.hpp
@@ -495,28 +495,12 @@ namespace __gnu_pbds
size_type m_size;
};
-#define PB_DS_ASSERT_VALID(X) \
- _GLIBCXX_DEBUG_ONLY(X.assert_valid(__FILE__, __LINE__);)
-
#define PB_DS_ASSERT_NODE_VALID(X) \
_GLIBCXX_DEBUG_ONLY(X->assert_valid(this, __FILE__, __LINE__);)
#define PB_DS_RECURSIVE_COUNT_LEAFS(X) \
recursive_count_leafs(X, __FILE__, __LINE__)
-#define PB_DS_CHECK_KEY_EXISTS(_Key) \
- _GLIBCXX_DEBUG_ONLY(debug_base::check_key_exists(_Key, __FILE__, __LINE__);)
-
-#define PB_DS_CHECK_KEY_DOES_NOT_EXIST(_Key) \
- _GLIBCXX_DEBUG_ONLY(debug_base::check_key_does_not_exist(_Key, \
- __FILE__, __LINE__);)
-
-#define PB_DS_DEBUG_VERIFY(_Cond) \
- _GLIBCXX_DEBUG_VERIFY_AT(_Cond, \
- _M_message(#_Cond" assertion from %1;:%2;") \
- ._M_string(__FILE__)._M_integer(__LINE__) \
- ,__file,__line)
-
#include <ext/pb_ds/detail/pat_trie_/constructors_destructor_fn_imps.hpp>
#include <ext/pb_ds/detail/pat_trie_/iterators_fn_imps.hpp>
#include <ext/pb_ds/detail/pat_trie_/insert_join_fn_imps.hpp>
@@ -529,12 +513,8 @@ namespace __gnu_pbds
#include <ext/pb_ds/detail/pat_trie_/trace_fn_imps.hpp>
#include <ext/pb_ds/detail/pat_trie_/update_fn_imps.hpp>
-#undef PB_DS_DEBUG_VERIFY
-#undef PB_DS_CHECK_KEY_DOES_NOT_EXIST
-#undef PB_DS_CHECK_KEY_EXISTS
#undef PB_DS_RECURSIVE_COUNT_LEAFS
#undef PB_DS_ASSERT_NODE_VALID
-#undef PB_DS_ASSERT_VALID
#undef PB_DS_CLASS_C_DEC
#undef PB_DS_CLASS_T_DEC
#undef PB_DS_CLASS_NAME
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/priority_queue_base_dispatch.hpp b/libstdc++-v3/include/ext/pb_ds/detail/priority_queue_base_dispatch.hpp
index ad05c4f5711..c48ba7c6e1a 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/priority_queue_base_dispatch.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/priority_queue_base_dispatch.hpp
@@ -41,12 +41,24 @@
#ifndef PB_DS_PRIORITY_QUEUE_BASE_DS_DISPATCHER_HPP
#define PB_DS_PRIORITY_QUEUE_BASE_DS_DISPATCHER_HPP
+#define PB_DS_ASSERT_VALID(X) \
+ _GLIBCXX_DEBUG_ONLY(X.assert_valid(__FILE__, __LINE__);)
+
+#define PB_DS_DEBUG_VERIFY(_Cond) \
+ _GLIBCXX_DEBUG_VERIFY_AT(_Cond, \
+ _M_message(#_Cond" assertion from %1;:%2;") \
+ ._M_string(__FILE__)._M_integer(__LINE__) \
+ ,__file,__line)
+
#include <ext/pb_ds/detail/pairing_heap_/pairing_heap_.hpp>
#include <ext/pb_ds/detail/binomial_heap_/binomial_heap_.hpp>
#include <ext/pb_ds/detail/rc_binomial_heap_/rc_binomial_heap_.hpp>
#include <ext/pb_ds/detail/binary_heap_/binary_heap_.hpp>
#include <ext/pb_ds/detail/thin_heap_/thin_heap_.hpp>
+#undef PB_DS_DEBUG_VERIFY
+#undef PB_DS_ASSERT_VALID
+
namespace __gnu_pbds
{
namespace detail
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/rb_tree_map_/rb_tree_.hpp b/libstdc++-v3/include/ext/pb_ds/detail/rb_tree_map_/rb_tree_.hpp
index 92ea7d65a75..7d46c95d7e0 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/rb_tree_map_/rb_tree_.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/rb_tree_map_/rb_tree_.hpp
@@ -260,18 +260,9 @@ namespace __gnu_pbds
split_at_node(node_pointer, PB_DS_CLASS_C_DEC&);
};
-#define PB_DS_ASSERT_VALID(X) \
- _GLIBCXX_DEBUG_ONLY(X.assert_valid(__FILE__, __LINE__);)
-
#define PB_DS_STRUCT_ONLY_ASSERT_VALID(X) \
_GLIBCXX_DEBUG_ONLY(X.structure_only_assert_valid(__FILE__, __LINE__);)
-#define PB_DS_DEBUG_VERIFY(_Cond) \
- _GLIBCXX_DEBUG_VERIFY_AT(_Cond, \
- _M_message(#_Cond" assertion from %1;:%2;") \
- ._M_string(__FILE__)._M_integer(__LINE__) \
- ,__file,__line)
-
#include <ext/pb_ds/detail/rb_tree_map_/constructors_destructor_fn_imps.hpp>
#include <ext/pb_ds/detail/rb_tree_map_/insert_fn_imps.hpp>
#include <ext/pb_ds/detail/rb_tree_map_/erase_fn_imps.hpp>
@@ -279,9 +270,7 @@ namespace __gnu_pbds
#include <ext/pb_ds/detail/rb_tree_map_/split_join_fn_imps.hpp>
#include <ext/pb_ds/detail/rb_tree_map_/info_fn_imps.hpp>
-#undef PB_DS_DEBUG_VERIFY
#undef PB_DS_STRUCT_ONLY_ASSERT_VALID
-#undef PB_DS_ASSERT_VALID
#undef PB_DS_CLASS_T_DEC
#undef PB_DS_CLASS_C_DEC
#undef PB_DS_CLASS_NAME
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/rc_binomial_heap_/rc.hpp b/libstdc++-v3/include/ext/pb_ds/detail/rc_binomial_heap_/rc.hpp
index d1942b99b17..845e6726db6 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/rc_binomial_heap_/rc.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/rc_binomial_heap_/rc.hpp
@@ -41,15 +41,6 @@
#ifndef PB_DS_RC_HPP
#define PB_DS_RC_HPP
-#define PB_DS_ASSERT_VALID(X) \
- _GLIBCXX_DEBUG_ONLY(X.assert_valid(__FILE__, __LINE__);)
-
-#define PB_DS_DEBUG_VERIFY(_Cond) \
- _GLIBCXX_DEBUG_VERIFY_AT(_Cond, \
- _M_message(#_Cond" assertion from %1;:%2;") \
- ._M_string(__FILE__)._M_integer(__LINE__) \
- ,__file,__line)
-
namespace __gnu_pbds
{
namespace detail
@@ -268,6 +259,4 @@ namespace __gnu_pbds
} // namespace detail
} // namespace __gnu_pbds
-#undef PB_DS_DEBUG_VERIFY
-#undef PB_DS_ASSERT_VALID
#endif
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/rc_binomial_heap_/rc_binomial_heap_.hpp b/libstdc++-v3/include/ext/pb_ds/detail/rc_binomial_heap_/rc_binomial_heap_.hpp
index 0bf8e4fd279..767bf108861 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/rc_binomial_heap_/rc_binomial_heap_.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/rc_binomial_heap_/rc_binomial_heap_.hpp
@@ -180,15 +180,6 @@ namespace __gnu_pbds
rc_t m_rc;
};
-#define PB_DS_ASSERT_VALID(X) \
- _GLIBCXX_DEBUG_ONLY(X.assert_valid(__FILE__, __LINE__);)
-
-#define PB_DS_DEBUG_VERIFY(_Cond) \
- _GLIBCXX_DEBUG_VERIFY_AT(_Cond, \
- _M_message(#_Cond" assertion from %1;:%2;") \
- ._M_string(__FILE__)._M_integer(__LINE__) \
- ,__file,__line)
-
#include <ext/pb_ds/detail/rc_binomial_heap_/constructors_destructor_fn_imps.hpp>
#include <ext/pb_ds/detail/rc_binomial_heap_/debug_fn_imps.hpp>
#include <ext/pb_ds/detail/rc_binomial_heap_/erase_fn_imps.hpp>
@@ -196,8 +187,6 @@ namespace __gnu_pbds
#include <ext/pb_ds/detail/rc_binomial_heap_/insert_fn_imps.hpp>
#include <ext/pb_ds/detail/rc_binomial_heap_/split_join_fn_imps.hpp>
-#undef PB_DS_DEBUG_VERIFY
-#undef PB_DS_ASSERT_VALID
#undef PB_DS_CLASS_C_DEC
#undef PB_DS_CLASS_T_DEC
#undef PB_DS_BASE_C_DEC
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/resize_policy/hash_load_check_resize_trigger_imp.hpp b/libstdc++-v3/include/ext/pb_ds/detail/resize_policy/hash_load_check_resize_trigger_imp.hpp
index 3d1b3996991..c8a8816d5be 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/resize_policy/hash_load_check_resize_trigger_imp.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/resize_policy/hash_load_check_resize_trigger_imp.hpp
@@ -286,8 +286,8 @@ void
PB_DS_CLASS_C_DEC::
assert_valid(const char* __file, int __line) const
{
- _GLIBCXX_DEBUG_ASSERT(m_load_max > m_load_min);
- _GLIBCXX_DEBUG_ASSERT(m_next_grow_size >= m_next_shrink_size);
+ PB_DS_DEBUG_VERIFY(m_load_max > m_load_min);
+ PB_DS_DEBUG_VERIFY(m_next_grow_size >= m_next_shrink_size);
}
# undef PB_DS_DEBUG_VERIFY
#endif
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/splay_tree_/splay_tree_.hpp b/libstdc++-v3/include/ext/pb_ds/detail/splay_tree_/splay_tree_.hpp
index 7c91b77f792..b6afa758eb8 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/splay_tree_/splay_tree_.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/splay_tree_/splay_tree_.hpp
@@ -136,6 +136,9 @@ namespace __gnu_pbds
{
private:
typedef PB_DS_BASE_C_DEC base_type;
+#ifdef _GLIBCXX_DEBUG
+ typedef base_type debug_base;
+#endif
typedef typename base_type::node_pointer node_pointer;
public:
@@ -277,23 +280,10 @@ namespace __gnu_pbds
erase_node(node_pointer);
};
-#define PB_DS_ASSERT_VALID(X) \
- _GLIBCXX_DEBUG_ONLY(X.assert_valid(__FILE__, __LINE__);)
-
#define PB_DS_ASSERT_BASE_NODE_CONSISTENT(_Node) \
_GLIBCXX_DEBUG_ONLY(base_type::assert_node_consistent(_Node, \
__FILE__, __LINE__);)
-#define PB_DS_CHECK_KEY_DOES_NOT_EXIST(_Key) \
- _GLIBCXX_DEBUG_ONLY(base_type::check_key_does_not_exist(_Key, \
- __FILE__, __LINE__);)
-
-#define PB_DS_DEBUG_VERIFY(_Cond) \
- _GLIBCXX_DEBUG_VERIFY_AT(_Cond, \
- _M_message(#_Cond" assertion from %1;:%2;") \
- ._M_string(__FILE__)._M_integer(__LINE__) \
- ,__file,__line)
-
#include <ext/pb_ds/detail/splay_tree_/constructors_destructor_fn_imps.hpp>
#include <ext/pb_ds/detail/splay_tree_/insert_fn_imps.hpp>
#include <ext/pb_ds/detail/splay_tree_/splay_fn_imps.hpp>
@@ -302,10 +292,7 @@ namespace __gnu_pbds
#include <ext/pb_ds/detail/splay_tree_/debug_fn_imps.hpp>
#include <ext/pb_ds/detail/splay_tree_/split_join_fn_imps.hpp>
-#undef PB_DS_DEBUG_VERIFY
-#undef PB_DS_CHECK_KEY_DOES_NOT_EXIST
#undef PB_DS_ASSERT_BASE_NODE_CONSISTENT
-#undef PB_DS_ASSERT_VALID
#undef PB_DS_CLASS_T_DEC
#undef PB_DS_CLASS_C_DEC
#undef PB_DS_CLASS_NAME
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/thin_heap_/thin_heap_.hpp b/libstdc++-v3/include/ext/pb_ds/detail/thin_heap_/thin_heap_.hpp
index d5fba5f5ac6..9741ef9cf1c 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/thin_heap_/thin_heap_.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/thin_heap_/thin_heap_.hpp
@@ -334,9 +334,6 @@ namespace __gnu_pbds
/* Pot's good, let's play */
};
-#define PB_DS_ASSERT_VALID(X) \
- _GLIBCXX_DEBUG_ONLY(X.assert_valid(__FILE__, __LINE__);)
-
#define PB_DS_ASSERT_NODE_CONSISTENT(_Node, _Bool) \
_GLIBCXX_DEBUG_ONLY(assert_node_consistent(_Node, _Bool, \
__FILE__, __LINE__);)
@@ -344,12 +341,6 @@ namespace __gnu_pbds
#define PB_DS_ASSERT_AUX_NULL(X) \
_GLIBCXX_DEBUG_ONLY(X.assert_aux_null(__FILE__, __LINE__);)
-#define PB_DS_DEBUG_VERIFY(_Cond) \
- _GLIBCXX_DEBUG_VERIFY_AT(_Cond, \
- _M_message(#_Cond" assertion from %1;:%2;") \
- ._M_string(__FILE__)._M_integer(__LINE__) \
- ,__file,__line)
-
#include <ext/pb_ds/detail/thin_heap_/constructors_destructor_fn_imps.hpp>
#include <ext/pb_ds/detail/thin_heap_/debug_fn_imps.hpp>
#include <ext/pb_ds/detail/thin_heap_/trace_fn_imps.hpp>
@@ -358,10 +349,8 @@ namespace __gnu_pbds
#include <ext/pb_ds/detail/thin_heap_/erase_fn_imps.hpp>
#include <ext/pb_ds/detail/thin_heap_/split_join_fn_imps.hpp>
-#undef PB_DS_DEBUG_VERIFY
#undef PB_DS_ASSERT_AUX_NULL
#undef PB_DS_ASSERT_NODE_CONSISTENT
-#undef PB_DS_ASSERT_VALID
#undef PB_DS_CLASS_C_DEC
#undef PB_DS_CLASS_T_DEC
#undef PB_DS_BASE_C_DEC
diff --git a/libstdc++-v3/include/profile/bitset b/libstdc++-v3/include/profile/bitset
index a995afa9723..bd4aa3e152f 100644
--- a/libstdc++-v3/include/profile/bitset
+++ b/libstdc++-v3/include/profile/bitset
@@ -1,6 +1,6 @@
// Profiling bitset implementation -*- C++ -*-
-// Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+// Copyright (C) 2009, 2010, 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
@@ -52,42 +52,42 @@ namespace __profile
friend class bitset;
reference();
- reference(const _Base_ref& __base, bitset* __seq)
+ reference(const _Base_ref& __base, bitset* __seq) _GLIBCXX_NOEXCEPT
: _Base_ref(__base)
{ }
public:
- reference(const reference& __x)
+ reference(const reference& __x) _GLIBCXX_NOEXCEPT
: _Base_ref(__x)
{ }
reference&
- operator=(bool __x)
+ operator=(bool __x) _GLIBCXX_NOEXCEPT
{
*static_cast<_Base_ref*>(this) = __x;
return *this;
}
reference&
- operator=(const reference& __x)
+ operator=(const reference& __x) _GLIBCXX_NOEXCEPT
{
*static_cast<_Base_ref*>(this) = __x;
return *this;
}
bool
- operator~() const
+ operator~() const _GLIBCXX_NOEXCEPT
{
return ~(*static_cast<const _Base_ref*>(this));
}
- operator bool() const
+ operator bool() const _GLIBCXX_NOEXCEPT
{
return *static_cast<const _Base_ref*>(this);
}
reference&
- flip()
+ flip() _GLIBCXX_NOEXCEPT
{
_Base_ref::flip();
return *this;
@@ -95,10 +95,11 @@ namespace __profile
};
// 23.3.5.1 constructors:
- _GLIBCXX_CONSTEXPR bitset() : _Base() { }
+ _GLIBCXX_CONSTEXPR bitset() _GLIBCXX_NOEXCEPT
+ : _Base() { }
#ifdef __GXX_EXPERIMENTAL_CXX0X__
- constexpr bitset(unsigned long long __val)
+ constexpr bitset(unsigned long long __val) noexcept
#else
bitset(unsigned long __val)
#endif
@@ -138,42 +139,42 @@ namespace __profile
// 23.3.5.2 bitset operations:
bitset<_Nb>&
- operator&=(const bitset<_Nb>& __rhs)
+ operator&=(const bitset<_Nb>& __rhs) _GLIBCXX_NOEXCEPT
{
_M_base() &= __rhs;
return *this;
}
bitset<_Nb>&
- operator|=(const bitset<_Nb>& __rhs)
+ operator|=(const bitset<_Nb>& __rhs) _GLIBCXX_NOEXCEPT
{
_M_base() |= __rhs;
return *this;
}
bitset<_Nb>&
- operator^=(const bitset<_Nb>& __rhs)
+ operator^=(const bitset<_Nb>& __rhs) _GLIBCXX_NOEXCEPT
{
_M_base() ^= __rhs;
return *this;
}
bitset<_Nb>&
- operator<<=(size_t __pos)
+ operator<<=(size_t __pos) _GLIBCXX_NOEXCEPT
{
_M_base() <<= __pos;
return *this;
}
bitset<_Nb>&
- operator>>=(size_t __pos)
+ operator>>=(size_t __pos) _GLIBCXX_NOEXCEPT
{
_M_base() >>= __pos;
return *this;
}
bitset<_Nb>&
- set()
+ set() _GLIBCXX_NOEXCEPT
{
_Base::set();
return *this;
@@ -189,7 +190,7 @@ namespace __profile
}
bitset<_Nb>&
- reset()
+ reset() _GLIBCXX_NOEXCEPT
{
_Base::reset();
return *this;
@@ -202,10 +203,12 @@ namespace __profile
return *this;
}
- bitset<_Nb> operator~() const { return bitset(~_M_base()); }
+ bitset<_Nb>
+ operator~() const _GLIBCXX_NOEXCEPT
+ { return bitset(~_M_base()); }
bitset<_Nb>&
- flip()
+ flip() _GLIBCXX_NOEXCEPT
{
_Base::flip();
return *this;
@@ -305,11 +308,11 @@ namespace __profile
using _Base::size;
bool
- operator==(const bitset<_Nb>& __rhs) const
+ operator==(const bitset<_Nb>& __rhs) const _GLIBCXX_NOEXCEPT
{ return _M_base() == __rhs; }
bool
- operator!=(const bitset<_Nb>& __rhs) const
+ operator!=(const bitset<_Nb>& __rhs) const _GLIBCXX_NOEXCEPT
{ return _M_base() != __rhs; }
using _Base::test;
@@ -318,33 +321,35 @@ namespace __profile
using _Base::none;
bitset<_Nb>
- operator<<(size_t __pos) const
+ operator<<(size_t __pos) const _GLIBCXX_NOEXCEPT
{ return bitset<_Nb>(_M_base() << __pos); }
bitset<_Nb>
- operator>>(size_t __pos) const
+ operator>>(size_t __pos) const _GLIBCXX_NOEXCEPT
{ return bitset<_Nb>(_M_base() >> __pos); }
_Base&
- _M_base() { return *this; }
+ _M_base() _GLIBCXX_NOEXCEPT
+ { return *this; }
const _Base&
- _M_base() const { return *this; }
+ _M_base() const _GLIBCXX_NOEXCEPT
+ { return *this; }
};
template<size_t _Nb>
bitset<_Nb>
- operator&(const bitset<_Nb>& __x, const bitset<_Nb>& __y)
+ operator&(const bitset<_Nb>& __x, const bitset<_Nb>& __y) _GLIBCXX_NOEXCEPT
{ return bitset<_Nb>(__x) &= __y; }
template<size_t _Nb>
bitset<_Nb>
- operator|(const bitset<_Nb>& __x, const bitset<_Nb>& __y)
+ operator|(const bitset<_Nb>& __x, const bitset<_Nb>& __y) _GLIBCXX_NOEXCEPT
{ return bitset<_Nb>(__x) |= __y; }
template<size_t _Nb>
bitset<_Nb>
- operator^(const bitset<_Nb>& __x, const bitset<_Nb>& __y)
+ operator^(const bitset<_Nb>& __x, const bitset<_Nb>& __y) _GLIBCXX_NOEXCEPT
{ return bitset<_Nb>(__x) ^= __y; }
template<typename _CharT, typename _Traits, size_t _Nb>
diff --git a/libstdc++-v3/include/std/array b/libstdc++-v3/include/std/array
index a0bdd24a85a..474b884ecb5 100644
--- a/libstdc++-v3/include/std/array
+++ b/libstdc++-v3/include/std/array
@@ -1,6 +1,6 @@
// <array> -*- C++ -*-
-// Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+// Copyright (C) 2007, 2008, 2009, 2010, 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
@@ -83,66 +83,67 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
void
swap(array& __other)
+ noexcept(noexcept(swap(std::declval<_Tp&>(), std::declval<_Tp&>())))
{ std::swap_ranges(begin(), end(), __other.begin()); }
// Iterators.
iterator
- begin()
+ begin() noexcept
{ return iterator(std::__addressof(_M_instance[0])); }
const_iterator
- begin() const
+ begin() const noexcept
{ return const_iterator(std::__addressof(_M_instance[0])); }
iterator
- end()
+ end() noexcept
{ return iterator(std::__addressof(_M_instance[_Nm])); }
const_iterator
- end() const
+ end() const noexcept
{ return const_iterator(std::__addressof(_M_instance[_Nm])); }
reverse_iterator
- rbegin()
+ rbegin() noexcept
{ return reverse_iterator(end()); }
const_reverse_iterator
- rbegin() const
+ rbegin() const noexcept
{ return const_reverse_iterator(end()); }
reverse_iterator
- rend()
+ rend() noexcept
{ return reverse_iterator(begin()); }
const_reverse_iterator
- rend() const
+ rend() const noexcept
{ return const_reverse_iterator(begin()); }
const_iterator
- cbegin() const
+ cbegin() const noexcept
{ return const_iterator(std::__addressof(_M_instance[0])); }
const_iterator
- cend() const
+ cend() const noexcept
{ return const_iterator(std::__addressof(_M_instance[_Nm])); }
const_reverse_iterator
- crbegin() const
+ crbegin() const noexcept
{ return const_reverse_iterator(end()); }
const_reverse_iterator
- crend() const
+ crend() const noexcept
{ return const_reverse_iterator(begin()); }
// Capacity.
constexpr size_type
- size() const { return _Nm; }
+ size() const noexcept { return _Nm; }
constexpr size_type
- max_size() const { return _Nm; }
+ max_size() const noexcept { return _Nm; }
constexpr bool
- empty() const { return size() == 0; }
+ empty() const noexcept { return size() == 0; }
// Element access.
reference
@@ -186,11 +187,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
{ return _Nm ? *(end() - 1) : *end(); }
_Tp*
- data()
+ data() noexcept
{ return std::__addressof(_M_instance[0]); }
const _Tp*
- data() const
+ data() const noexcept
{ return std::__addressof(_M_instance[0]); }
};
@@ -228,42 +229,44 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
operator>=(const array<_Tp, _Nm>& __one, const array<_Tp, _Nm>& __two)
{ return !(__one < __two); }
- // Specialized algorithms [6.2.2.2].
+ // Specialized algorithms.
template<typename _Tp, std::size_t _Nm>
inline void
swap(array<_Tp, _Nm>& __one, array<_Tp, _Nm>& __two)
+ noexcept(noexcept(__one.swap(__two)))
{ __one.swap(__two); }
- // Tuple interface to class template array [6.2.2.5].
+ // Tuple interface to class template array.
/// tuple_size
template<typename _Tp>
class tuple_size;
+ template<typename _Tp, std::size_t _Nm>
+ struct tuple_size<array<_Tp, _Nm>>
+ : public integral_constant<std::size_t, _Nm> { };
+
/// tuple_element
template<std::size_t _Int, typename _Tp>
class tuple_element;
- template<typename _Tp, std::size_t _Nm>
- struct tuple_size<array<_Tp, _Nm> >
- { static const std::size_t value = _Nm; };
-
- template<typename _Tp, std::size_t _Nm>
- const std::size_t
- tuple_size<array<_Tp, _Nm> >::value;
-
template<std::size_t _Int, typename _Tp, std::size_t _Nm>
struct tuple_element<_Int, array<_Tp, _Nm> >
{ typedef _Tp type; };
template<std::size_t _Int, typename _Tp, std::size_t _Nm>
inline _Tp&
- get(array<_Tp, _Nm>& __arr)
+ get(array<_Tp, _Nm>& __arr) noexcept
{ return __arr[_Int]; }
template<std::size_t _Int, typename _Tp, std::size_t _Nm>
+ inline _Tp&&
+ get(array<_Tp, _Nm>&& __arr) noexcept
+ { return std::move(get<_Int>(__arr)); }
+
+ template<std::size_t _Int, typename _Tp, std::size_t _Nm>
inline const _Tp&
- get(const array<_Tp, _Nm>& __arr)
+ get(const array<_Tp, _Nm>& __arr) noexcept
{ return __arr[_Int]; }
_GLIBCXX_END_NAMESPACE_VERSION
diff --git a/libstdc++-v3/include/std/bitset b/libstdc++-v3/include/std/bitset
index 381a0421a54..6d23df2cba8 100644
--- a/libstdc++-v3/include/std/bitset
+++ b/libstdc++-v3/include/std/bitset
@@ -75,11 +75,11 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
/// 0 is the least significant word.
_WordT _M_w[_Nw];
- _GLIBCXX_CONSTEXPR _Base_bitset()
+ _GLIBCXX_CONSTEXPR _Base_bitset() _GLIBCXX_NOEXCEPT
: _M_w() { }
#ifdef __GXX_EXPERIMENTAL_CXX0X__
- constexpr _Base_bitset(unsigned long long __val)
+ constexpr _Base_bitset(unsigned long long __val) noexcept
: _M_w{ _WordT(__val)
#if __SIZEOF_LONG_LONG__ > __SIZEOF_LONG__
, _WordT(__val >> _GLIBCXX_BITSET_BITS_PER_WORD)
@@ -92,90 +92,90 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
#endif
static _GLIBCXX_CONSTEXPR size_t
- _S_whichword(size_t __pos )
+ _S_whichword(size_t __pos ) _GLIBCXX_NOEXCEPT
{ return __pos / _GLIBCXX_BITSET_BITS_PER_WORD; }
static _GLIBCXX_CONSTEXPR size_t
- _S_whichbyte(size_t __pos )
+ _S_whichbyte(size_t __pos ) _GLIBCXX_NOEXCEPT
{ return (__pos % _GLIBCXX_BITSET_BITS_PER_WORD) / __CHAR_BIT__; }
static _GLIBCXX_CONSTEXPR size_t
- _S_whichbit(size_t __pos )
+ _S_whichbit(size_t __pos ) _GLIBCXX_NOEXCEPT
{ return __pos % _GLIBCXX_BITSET_BITS_PER_WORD; }
static _GLIBCXX_CONSTEXPR _WordT
- _S_maskbit(size_t __pos )
+ _S_maskbit(size_t __pos ) _GLIBCXX_NOEXCEPT
{ return (static_cast<_WordT>(1)) << _S_whichbit(__pos); }
_WordT&
- _M_getword(size_t __pos)
+ _M_getword(size_t __pos) _GLIBCXX_NOEXCEPT
{ return _M_w[_S_whichword(__pos)]; }
_WordT
- _M_getword(size_t __pos) const
+ _M_getword(size_t __pos) const _GLIBCXX_NOEXCEPT
{ return _M_w[_S_whichword(__pos)]; }
#ifdef __GXX_EXPERIMENTAL_CXX0X__
const _WordT*
- _M_getdata() const
+ _M_getdata() const noexcept
{ return _M_w; }
#endif
_WordT&
- _M_hiword()
+ _M_hiword() _GLIBCXX_NOEXCEPT
{ return _M_w[_Nw - 1]; }
_GLIBCXX_CONSTEXPR _WordT
- _M_hiword() const
+ _M_hiword() const _GLIBCXX_NOEXCEPT
{ return _M_w[_Nw - 1]; }
void
- _M_do_and(const _Base_bitset<_Nw>& __x)
+ _M_do_and(const _Base_bitset<_Nw>& __x) _GLIBCXX_NOEXCEPT
{
for (size_t __i = 0; __i < _Nw; __i++)
_M_w[__i] &= __x._M_w[__i];
}
void
- _M_do_or(const _Base_bitset<_Nw>& __x)
+ _M_do_or(const _Base_bitset<_Nw>& __x) _GLIBCXX_NOEXCEPT
{
for (size_t __i = 0; __i < _Nw; __i++)
_M_w[__i] |= __x._M_w[__i];
}
void
- _M_do_xor(const _Base_bitset<_Nw>& __x)
+ _M_do_xor(const _Base_bitset<_Nw>& __x) _GLIBCXX_NOEXCEPT
{
for (size_t __i = 0; __i < _Nw; __i++)
_M_w[__i] ^= __x._M_w[__i];
}
void
- _M_do_left_shift(size_t __shift);
+ _M_do_left_shift(size_t __shift) _GLIBCXX_NOEXCEPT;
void
- _M_do_right_shift(size_t __shift);
+ _M_do_right_shift(size_t __shift) _GLIBCXX_NOEXCEPT;
void
- _M_do_flip()
+ _M_do_flip() _GLIBCXX_NOEXCEPT
{
for (size_t __i = 0; __i < _Nw; __i++)
_M_w[__i] = ~_M_w[__i];
}
void
- _M_do_set()
+ _M_do_set() _GLIBCXX_NOEXCEPT
{
for (size_t __i = 0; __i < _Nw; __i++)
_M_w[__i] = ~static_cast<_WordT>(0);
}
void
- _M_do_reset()
+ _M_do_reset() _GLIBCXX_NOEXCEPT
{ __builtin_memset(_M_w, 0, _Nw * sizeof(_WordT)); }
bool
- _M_is_equal(const _Base_bitset<_Nw>& __x) const
+ _M_is_equal(const _Base_bitset<_Nw>& __x) const _GLIBCXX_NOEXCEPT
{
for (size_t __i = 0; __i < _Nw; ++__i)
if (_M_w[__i] != __x._M_w[__i])
@@ -184,7 +184,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
}
size_t
- _M_are_all_aux() const
+ _M_are_all_aux() const _GLIBCXX_NOEXCEPT
{
for (size_t __i = 0; __i < _Nw - 1; __i++)
if (_M_w[__i] != ~static_cast<_WordT>(0))
@@ -194,7 +194,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
}
bool
- _M_is_any() const
+ _M_is_any() const _GLIBCXX_NOEXCEPT
{
for (size_t __i = 0; __i < _Nw; __i++)
if (_M_w[__i] != static_cast<_WordT>(0))
@@ -203,7 +203,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
}
size_t
- _M_do_count() const
+ _M_do_count() const _GLIBCXX_NOEXCEPT
{
size_t __result = 0;
for (size_t __i = 0; __i < _Nw; __i++)
@@ -221,17 +221,18 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
// find first "on" bit
size_t
- _M_do_find_first(size_t __not_found) const;
+ _M_do_find_first(size_t __not_found) const _GLIBCXX_NOEXCEPT;
// find the next "on" bit that follows "prev"
size_t
- _M_do_find_next(size_t __prev, size_t __not_found) const;
+ _M_do_find_next(size_t __prev, size_t __not_found) const
+ _GLIBCXX_NOEXCEPT;
};
// Definitions of non-inline functions from _Base_bitset.
template<size_t _Nw>
void
- _Base_bitset<_Nw>::_M_do_left_shift(size_t __shift)
+ _Base_bitset<_Nw>::_M_do_left_shift(size_t __shift) _GLIBCXX_NOEXCEPT
{
if (__builtin_expect(__shift != 0, 1))
{
@@ -257,7 +258,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
template<size_t _Nw>
void
- _Base_bitset<_Nw>::_M_do_right_shift(size_t __shift)
+ _Base_bitset<_Nw>::_M_do_right_shift(size_t __shift) _GLIBCXX_NOEXCEPT
{
if (__builtin_expect(__shift != 0, 1))
{
@@ -311,7 +312,8 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
template<size_t _Nw>
size_t
- _Base_bitset<_Nw>::_M_do_find_first(size_t __not_found) const
+ _Base_bitset<_Nw>::
+ _M_do_find_first(size_t __not_found) const _GLIBCXX_NOEXCEPT
{
for (size_t __i = 0; __i < _Nw; __i++)
{
@@ -326,7 +328,8 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
template<size_t _Nw>
size_t
- _Base_bitset<_Nw>::_M_do_find_next(size_t __prev, size_t __not_found) const
+ _Base_bitset<_Nw>::
+ _M_do_find_next(size_t __prev, size_t __not_found) const _GLIBCXX_NOEXCEPT
{
// make bound inclusive
++__prev;
@@ -370,12 +373,12 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
typedef unsigned long _WordT;
_WordT _M_w;
- _GLIBCXX_CONSTEXPR _Base_bitset()
+ _GLIBCXX_CONSTEXPR _Base_bitset() _GLIBCXX_NOEXCEPT
: _M_w(0)
{ }
#ifdef __GXX_EXPERIMENTAL_CXX0X__
- constexpr _Base_bitset(unsigned long long __val)
+ constexpr _Base_bitset(unsigned long long __val) noexcept
#else
_Base_bitset(unsigned long __val)
#endif
@@ -383,103 +386,103 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
{ }
static _GLIBCXX_CONSTEXPR size_t
- _S_whichword(size_t __pos )
+ _S_whichword(size_t __pos ) _GLIBCXX_NOEXCEPT
{ return __pos / _GLIBCXX_BITSET_BITS_PER_WORD; }
static _GLIBCXX_CONSTEXPR size_t
- _S_whichbyte(size_t __pos )
+ _S_whichbyte(size_t __pos ) _GLIBCXX_NOEXCEPT
{ return (__pos % _GLIBCXX_BITSET_BITS_PER_WORD) / __CHAR_BIT__; }
static _GLIBCXX_CONSTEXPR size_t
- _S_whichbit(size_t __pos )
+ _S_whichbit(size_t __pos ) _GLIBCXX_NOEXCEPT
{ return __pos % _GLIBCXX_BITSET_BITS_PER_WORD; }
static _GLIBCXX_CONSTEXPR _WordT
- _S_maskbit(size_t __pos )
+ _S_maskbit(size_t __pos ) _GLIBCXX_NOEXCEPT
{ return (static_cast<_WordT>(1)) << _S_whichbit(__pos); }
_WordT&
- _M_getword(size_t)
+ _M_getword(size_t) _GLIBCXX_NOEXCEPT
{ return _M_w; }
_WordT
- _M_getword(size_t) const
+ _M_getword(size_t) const _GLIBCXX_NOEXCEPT
{ return _M_w; }
#ifdef __GXX_EXPERIMENTAL_CXX0X__
const _WordT*
- _M_getdata() const
+ _M_getdata() const noexcept
{ return &_M_w; }
#endif
_WordT&
- _M_hiword()
+ _M_hiword() _GLIBCXX_NOEXCEPT
{ return _M_w; }
_GLIBCXX_CONSTEXPR _WordT
- _M_hiword() const
+ _M_hiword() const _GLIBCXX_NOEXCEPT
{ return _M_w; }
void
- _M_do_and(const _Base_bitset<1>& __x)
+ _M_do_and(const _Base_bitset<1>& __x) _GLIBCXX_NOEXCEPT
{ _M_w &= __x._M_w; }
void
- _M_do_or(const _Base_bitset<1>& __x)
+ _M_do_or(const _Base_bitset<1>& __x) _GLIBCXX_NOEXCEPT
{ _M_w |= __x._M_w; }
void
- _M_do_xor(const _Base_bitset<1>& __x)
+ _M_do_xor(const _Base_bitset<1>& __x) _GLIBCXX_NOEXCEPT
{ _M_w ^= __x._M_w; }
void
- _M_do_left_shift(size_t __shift)
+ _M_do_left_shift(size_t __shift) _GLIBCXX_NOEXCEPT
{ _M_w <<= __shift; }
void
- _M_do_right_shift(size_t __shift)
+ _M_do_right_shift(size_t __shift) _GLIBCXX_NOEXCEPT
{ _M_w >>= __shift; }
void
- _M_do_flip()
+ _M_do_flip() _GLIBCXX_NOEXCEPT
{ _M_w = ~_M_w; }
void
- _M_do_set()
+ _M_do_set() _GLIBCXX_NOEXCEPT
{ _M_w = ~static_cast<_WordT>(0); }
void
- _M_do_reset()
+ _M_do_reset() _GLIBCXX_NOEXCEPT
{ _M_w = 0; }
bool
- _M_is_equal(const _Base_bitset<1>& __x) const
+ _M_is_equal(const _Base_bitset<1>& __x) const _GLIBCXX_NOEXCEPT
{ return _M_w == __x._M_w; }
size_t
- _M_are_all_aux() const
+ _M_are_all_aux() const _GLIBCXX_NOEXCEPT
{ return __builtin_popcountl(_M_w); }
bool
- _M_is_any() const
+ _M_is_any() const _GLIBCXX_NOEXCEPT
{ return _M_w != 0; }
size_t
- _M_do_count() const
+ _M_do_count() const _GLIBCXX_NOEXCEPT
{ return __builtin_popcountl(_M_w); }
unsigned long
- _M_do_to_ulong() const
+ _M_do_to_ulong() const _GLIBCXX_NOEXCEPT
{ return _M_w; }
#ifdef __GXX_EXPERIMENTAL_CXX0X__
unsigned long long
- _M_do_to_ullong() const
+ _M_do_to_ullong() const noexcept
{ return _M_w; }
#endif
size_t
- _M_do_find_first(size_t __not_found) const
+ _M_do_find_first(size_t __not_found) const _GLIBCXX_NOEXCEPT
{
if (_M_w != 0)
return __builtin_ctzl(_M_w);
@@ -490,6 +493,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
// find the next "on" bit that follows "prev"
size_t
_M_do_find_next(size_t __prev, size_t __not_found) const
+ _GLIBCXX_NOEXCEPT
{
++__prev;
if (__prev >= ((size_t) _GLIBCXX_BITSET_BITS_PER_WORD))
@@ -513,30 +517,30 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
{
typedef unsigned long _WordT;
- _GLIBCXX_CONSTEXPR _Base_bitset()
+ _GLIBCXX_CONSTEXPR _Base_bitset() _GLIBCXX_NOEXCEPT
{ }
#ifdef __GXX_EXPERIMENTAL_CXX0X__
- constexpr _Base_bitset(unsigned long long)
+ constexpr _Base_bitset(unsigned long long) noexcept
#else
_Base_bitset(unsigned long)
#endif
{ }
static _GLIBCXX_CONSTEXPR size_t
- _S_whichword(size_t __pos )
+ _S_whichword(size_t __pos ) _GLIBCXX_NOEXCEPT
{ return __pos / _GLIBCXX_BITSET_BITS_PER_WORD; }
static _GLIBCXX_CONSTEXPR size_t
- _S_whichbyte(size_t __pos )
+ _S_whichbyte(size_t __pos ) _GLIBCXX_NOEXCEPT
{ return (__pos % _GLIBCXX_BITSET_BITS_PER_WORD) / __CHAR_BIT__; }
static _GLIBCXX_CONSTEXPR size_t
- _S_whichbit(size_t __pos )
+ _S_whichbit(size_t __pos ) _GLIBCXX_NOEXCEPT
{ return __pos % _GLIBCXX_BITSET_BITS_PER_WORD; }
static _GLIBCXX_CONSTEXPR _WordT
- _S_maskbit(size_t __pos )
+ _S_maskbit(size_t __pos ) _GLIBCXX_NOEXCEPT
{ return (static_cast<_WordT>(1)) << _S_whichbit(__pos); }
// This would normally give access to the data. The bounds-checking
@@ -547,89 +551,89 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
// make an unchecked call; all the memory ugliness is therefore
// localized to this single should-never-get-this-far function.
_WordT&
- _M_getword(size_t)
- {
+ _M_getword(size_t) _GLIBCXX_NOEXCEPT
+ {
__throw_out_of_range(__N("_Base_bitset::_M_getword"));
- return *new _WordT;
+ return *new _WordT;
}
_WordT
- _M_getword(size_t __pos) const
+ _M_getword(size_t __pos) const _GLIBCXX_NOEXCEPT
{ return 0; }
_GLIBCXX_CONSTEXPR _WordT
- _M_hiword() const
+ _M_hiword() const _GLIBCXX_NOEXCEPT
{ return 0; }
void
- _M_do_and(const _Base_bitset<0>&)
+ _M_do_and(const _Base_bitset<0>&) _GLIBCXX_NOEXCEPT
{ }
void
- _M_do_or(const _Base_bitset<0>&)
+ _M_do_or(const _Base_bitset<0>&) _GLIBCXX_NOEXCEPT
{ }
void
- _M_do_xor(const _Base_bitset<0>&)
+ _M_do_xor(const _Base_bitset<0>&) _GLIBCXX_NOEXCEPT
{ }
void
- _M_do_left_shift(size_t)
+ _M_do_left_shift(size_t) _GLIBCXX_NOEXCEPT
{ }
void
- _M_do_right_shift(size_t)
+ _M_do_right_shift(size_t) _GLIBCXX_NOEXCEPT
{ }
void
- _M_do_flip()
+ _M_do_flip() _GLIBCXX_NOEXCEPT
{ }
void
- _M_do_set()
+ _M_do_set() _GLIBCXX_NOEXCEPT
{ }
void
- _M_do_reset()
+ _M_do_reset() _GLIBCXX_NOEXCEPT
{ }
// Are all empty bitsets equal to each other? Are they equal to
// themselves? How to compare a thing which has no state? What is
// the sound of one zero-length bitset clapping?
bool
- _M_is_equal(const _Base_bitset<0>&) const
+ _M_is_equal(const _Base_bitset<0>&) const _GLIBCXX_NOEXCEPT
{ return true; }
size_t
- _M_are_all_aux() const
+ _M_are_all_aux() const _GLIBCXX_NOEXCEPT
{ return 0; }
bool
- _M_is_any() const
+ _M_is_any() const _GLIBCXX_NOEXCEPT
{ return false; }
size_t
- _M_do_count() const
+ _M_do_count() const _GLIBCXX_NOEXCEPT
{ return 0; }
unsigned long
- _M_do_to_ulong() const
+ _M_do_to_ulong() const _GLIBCXX_NOEXCEPT
{ return 0; }
#ifdef __GXX_EXPERIMENTAL_CXX0X__
unsigned long long
- _M_do_to_ullong() const
+ _M_do_to_ullong() const noexcept
{ return 0; }
#endif
// Normally "not found" is the size, but that could also be
// misinterpreted as an index in this corner case. Oh well.
size_t
- _M_do_find_first(size_t) const
+ _M_do_find_first(size_t) const _GLIBCXX_NOEXCEPT
{ return 0; }
size_t
- _M_do_find_next(size_t, size_t) const
+ _M_do_find_next(size_t, size_t) const _GLIBCXX_NOEXCEPT
{ return 0; }
};
@@ -641,7 +645,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
typedef unsigned long _WordT;
static void
- _S_do_sanitize(_WordT& __val)
+ _S_do_sanitize(_WordT& __val) _GLIBCXX_NOEXCEPT
{ __val &= ~((~static_cast<_WordT>(0)) << _Extrabits); }
};
@@ -651,7 +655,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
typedef unsigned long _WordT;
static void
- _S_do_sanitize(_WordT) { }
+ _S_do_sanitize(_WordT) _GLIBCXX_NOEXCEPT { }
};
/**
@@ -727,7 +731,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
typedef unsigned long _WordT;
void
- _M_do_sanitize()
+ _M_do_sanitize() _GLIBCXX_NOEXCEPT
{
typedef _Sanitize<_Nb % _GLIBCXX_BITSET_BITS_PER_WORD> __sanitize_type;
__sanitize_type::_S_do_sanitize(this->_M_hiword());
@@ -761,18 +765,18 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
reference();
public:
- reference(bitset& __b, size_t __pos)
+ reference(bitset& __b, size_t __pos) _GLIBCXX_NOEXCEPT
{
_M_wp = &__b._M_getword(__pos);
_M_bpos = _Base::_S_whichbit(__pos);
}
- ~reference()
+ ~reference() _GLIBCXX_NOEXCEPT
{ }
// For b[i] = __x;
reference&
- operator=(bool __x)
+ operator=(bool __x) _GLIBCXX_NOEXCEPT
{
if (__x)
*_M_wp |= _Base::_S_maskbit(_M_bpos);
@@ -783,7 +787,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
// For b[i] = b[__j];
reference&
- operator=(const reference& __j)
+ operator=(const reference& __j) _GLIBCXX_NOEXCEPT
{
if ((*(__j._M_wp) & _Base::_S_maskbit(__j._M_bpos)))
*_M_wp |= _Base::_S_maskbit(_M_bpos);
@@ -794,16 +798,16 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
// Flips the bit
bool
- operator~() const
+ operator~() const _GLIBCXX_NOEXCEPT
{ return (*(_M_wp) & _Base::_S_maskbit(_M_bpos)) == 0; }
// For __x = b[i];
- operator bool() const
+ operator bool() const _GLIBCXX_NOEXCEPT
{ return (*(_M_wp) & _Base::_S_maskbit(_M_bpos)) != 0; }
// For b[i].flip();
reference&
- flip()
+ flip() _GLIBCXX_NOEXCEPT
{
*_M_wp ^= _Base::_S_maskbit(_M_bpos);
return *this;
@@ -813,12 +817,12 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
// 23.3.5.1 constructors:
/// All bits set to zero.
- _GLIBCXX_CONSTEXPR bitset()
+ _GLIBCXX_CONSTEXPR bitset() _GLIBCXX_NOEXCEPT
{ }
/// Initial bits bitwise-copied from a single word (others set to zero).
#ifdef __GXX_EXPERIMENTAL_CXX0X__
- constexpr bitset(unsigned long long __val)
+ constexpr bitset(unsigned long long __val) noexcept
: _Base(__val) { }
#else
bitset(unsigned long __val)
@@ -921,21 +925,21 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* These should be self-explanatory.
*/
bitset<_Nb>&
- operator&=(const bitset<_Nb>& __rhs)
+ operator&=(const bitset<_Nb>& __rhs) _GLIBCXX_NOEXCEPT
{
this->_M_do_and(__rhs);
return *this;
}
bitset<_Nb>&
- operator|=(const bitset<_Nb>& __rhs)
+ operator|=(const bitset<_Nb>& __rhs) _GLIBCXX_NOEXCEPT
{
this->_M_do_or(__rhs);
return *this;
}
bitset<_Nb>&
- operator^=(const bitset<_Nb>& __rhs)
+ operator^=(const bitset<_Nb>& __rhs) _GLIBCXX_NOEXCEPT
{
this->_M_do_xor(__rhs);
return *this;
@@ -950,7 +954,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* These should be self-explanatory.
*/
bitset<_Nb>&
- operator<<=(size_t __position)
+ operator<<=(size_t __position) _GLIBCXX_NOEXCEPT
{
if (__builtin_expect(__position < _Nb, 1))
{
@@ -963,7 +967,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
}
bitset<_Nb>&
- operator>>=(size_t __position)
+ operator>>=(size_t __position) _GLIBCXX_NOEXCEPT
{
if (__builtin_expect(__position < _Nb, 1))
{
@@ -983,14 +987,14 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* @ingroup SGIextensions
*/
bitset<_Nb>&
- _Unchecked_set(size_t __pos)
+ _Unchecked_set(size_t __pos) _GLIBCXX_NOEXCEPT
{
this->_M_getword(__pos) |= _Base::_S_maskbit(__pos);
return *this;
}
bitset<_Nb>&
- _Unchecked_set(size_t __pos, int __val)
+ _Unchecked_set(size_t __pos, int __val) _GLIBCXX_NOEXCEPT
{
if (__val)
this->_M_getword(__pos) |= _Base::_S_maskbit(__pos);
@@ -1000,21 +1004,21 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
}
bitset<_Nb>&
- _Unchecked_reset(size_t __pos)
+ _Unchecked_reset(size_t __pos) _GLIBCXX_NOEXCEPT
{
this->_M_getword(__pos) &= ~_Base::_S_maskbit(__pos);
return *this;
}
bitset<_Nb>&
- _Unchecked_flip(size_t __pos)
+ _Unchecked_flip(size_t __pos) _GLIBCXX_NOEXCEPT
{
this->_M_getword(__pos) ^= _Base::_S_maskbit(__pos);
return *this;
}
bool
- _Unchecked_test(size_t __pos) const
+ _Unchecked_test(size_t __pos) const _GLIBCXX_NOEXCEPT
{ return ((this->_M_getword(__pos) & _Base::_S_maskbit(__pos))
!= static_cast<_WordT>(0)); }
//@}
@@ -1024,7 +1028,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* @brief Sets every bit to true.
*/
bitset<_Nb>&
- set()
+ set() _GLIBCXX_NOEXCEPT
{
this->_M_do_set();
this->_M_do_sanitize();
@@ -1049,7 +1053,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* @brief Sets every bit to false.
*/
bitset<_Nb>&
- reset()
+ reset() _GLIBCXX_NOEXCEPT
{
this->_M_do_reset();
return *this;
@@ -1074,7 +1078,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* @brief Toggles every bit to its opposite value.
*/
bitset<_Nb>&
- flip()
+ flip() _GLIBCXX_NOEXCEPT
{
this->_M_do_flip();
this->_M_do_sanitize();
@@ -1096,7 +1100,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
/// See the no-argument flip().
bitset<_Nb>
- operator~() const
+ operator~() const _GLIBCXX_NOEXCEPT
{ return bitset<_Nb>(*this).flip(); }
//@{
@@ -1247,22 +1251,22 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
/// Returns the number of bits which are set.
size_t
- count() const
+ count() const _GLIBCXX_NOEXCEPT
{ return this->_M_do_count(); }
/// Returns the total number of bits.
_GLIBCXX_CONSTEXPR size_t
- size() const
+ size() const _GLIBCXX_NOEXCEPT
{ return _Nb; }
//@{
/// These comparisons for equality/inequality are, well, @e bitwise.
bool
- operator==(const bitset<_Nb>& __rhs) const
+ operator==(const bitset<_Nb>& __rhs) const _GLIBCXX_NOEXCEPT
{ return this->_M_is_equal(__rhs); }
bool
- operator!=(const bitset<_Nb>& __rhs) const
+ operator!=(const bitset<_Nb>& __rhs) const _GLIBCXX_NOEXCEPT
{ return !this->_M_is_equal(__rhs); }
//@}
@@ -1287,7 +1291,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* @return True if all the bits are set.
*/
bool
- all() const
+ all() const _GLIBCXX_NOEXCEPT
{ return this->_M_are_all_aux() == _Nb; }
/**
@@ -1295,7 +1299,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* @return True if at least one bit is set.
*/
bool
- any() const
+ any() const _GLIBCXX_NOEXCEPT
{ return this->_M_is_any(); }
/**
@@ -1303,17 +1307,17 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* @return True if none of the bits are set.
*/
bool
- none() const
+ none() const _GLIBCXX_NOEXCEPT
{ return !this->_M_is_any(); }
//@{
/// Self-explanatory.
bitset<_Nb>
- operator<<(size_t __position) const
+ operator<<(size_t __position) const _GLIBCXX_NOEXCEPT
{ return bitset<_Nb>(*this) <<= __position; }
bitset<_Nb>
- operator>>(size_t __position) const
+ operator>>(size_t __position) const _GLIBCXX_NOEXCEPT
{ return bitset<_Nb>(*this) >>= __position; }
//@}
@@ -1324,7 +1328,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* @sa _Find_next
*/
size_t
- _Find_first() const
+ _Find_first() const _GLIBCXX_NOEXCEPT
{ return this->_M_do_find_first(_Nb); }
/**
@@ -1335,7 +1339,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* @sa _Find_first
*/
size_t
- _Find_next(size_t __prev ) const
+ _Find_next(size_t __prev ) const _GLIBCXX_NOEXCEPT
{ return this->_M_do_find_next(__prev, _Nb); }
};
@@ -1386,7 +1390,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
*/
template<size_t _Nb>
inline bitset<_Nb>
- operator&(const bitset<_Nb>& __x, const bitset<_Nb>& __y)
+ operator&(const bitset<_Nb>& __x, const bitset<_Nb>& __y) _GLIBCXX_NOEXCEPT
{
bitset<_Nb> __result(__x);
__result &= __y;
@@ -1395,7 +1399,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
template<size_t _Nb>
inline bitset<_Nb>
- operator|(const bitset<_Nb>& __x, const bitset<_Nb>& __y)
+ operator|(const bitset<_Nb>& __x, const bitset<_Nb>& __y) _GLIBCXX_NOEXCEPT
{
bitset<_Nb> __result(__x);
__result |= __y;
@@ -1404,7 +1408,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
template <size_t _Nb>
inline bitset<_Nb>
- operator^(const bitset<_Nb>& __x, const bitset<_Nb>& __y)
+ operator^(const bitset<_Nb>& __x, const bitset<_Nb>& __y) _GLIBCXX_NOEXCEPT
{
bitset<_Nb> __result(__x);
__result ^= __y;
diff --git a/libstdc++-v3/include/std/limits b/libstdc++-v3/include/std/limits
index 9a311973c4a..907df6b8d53 100644
--- a/libstdc++-v3/include/std/limits
+++ b/libstdc++-v3/include/std/limits
@@ -1,7 +1,7 @@
// The template and inlines for the numeric_limits classes. -*- C++ -*-
// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
-// 2008, 2009, 2010 Free Software Foundation, Inc.
+// 2008, 2009, 2010, 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
@@ -306,47 +306,47 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
/** The minimum finite value, or for floating types with
denormalization, the minimum positive normalized value. */
static _GLIBCXX_CONSTEXPR _Tp
- min() throw() { return static_cast<_Tp>(0); }
+ min() _GLIBCXX_USE_NOEXCEPT { return static_cast<_Tp>(0); }
/** The maximum finite value. */
static _GLIBCXX_CONSTEXPR _Tp
- max() throw() { return static_cast<_Tp>(0); }
+ max() _GLIBCXX_USE_NOEXCEPT { return static_cast<_Tp>(0); }
#ifdef __GXX_EXPERIMENTAL_CXX0X__
/** A finite value x such that there is no other finite value y
* where y < x. */
static constexpr _Tp
- lowest() throw() { return static_cast<_Tp>(0); }
+ lowest() noexcept { return static_cast<_Tp>(0); }
#endif
/** The @e machine @e epsilon: the difference between 1 and the least
value greater than 1 that is representable. */
static _GLIBCXX_CONSTEXPR _Tp
- epsilon() throw() { return static_cast<_Tp>(0); }
+ epsilon() _GLIBCXX_USE_NOEXCEPT { return static_cast<_Tp>(0); }
/** The maximum rounding error measurement (see LIA-1). */
static _GLIBCXX_CONSTEXPR _Tp
- round_error() throw() { return static_cast<_Tp>(0); }
+ round_error() _GLIBCXX_USE_NOEXCEPT { return static_cast<_Tp>(0); }
/** The representation of positive infinity, if @c has_infinity. */
static _GLIBCXX_CONSTEXPR _Tp
- infinity() throw() { return static_cast<_Tp>(0); }
+ infinity() _GLIBCXX_USE_NOEXCEPT { return static_cast<_Tp>(0); }
/** The representation of a quiet <em>Not a Number</em>,
if @c has_quiet_NaN. */
static _GLIBCXX_CONSTEXPR _Tp
- quiet_NaN() throw() { return static_cast<_Tp>(0); }
+ quiet_NaN() _GLIBCXX_USE_NOEXCEPT { return static_cast<_Tp>(0); }
/** The representation of a signaling <em>Not a Number</em>, if
@c has_signaling_NaN. */
static _GLIBCXX_CONSTEXPR _Tp
- signaling_NaN() throw() { return static_cast<_Tp>(0); }
+ signaling_NaN() _GLIBCXX_USE_NOEXCEPT { return static_cast<_Tp>(0); }
/** The minimum positive denormalized value. For types where
@c has_denorm is false, this is the minimum positive normalized
value. */
static _GLIBCXX_CONSTEXPR _Tp
- denorm_min() throw() { return static_cast<_Tp>(0); }
+ denorm_min() _GLIBCXX_USE_NOEXCEPT { return static_cast<_Tp>(0); }
};
#ifdef __GXX_EXPERIMENTAL_CXX0X__
@@ -373,14 +373,14 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true;
static _GLIBCXX_CONSTEXPR bool
- min() throw() { return false; }
+ min() _GLIBCXX_USE_NOEXCEPT { return false; }
static _GLIBCXX_CONSTEXPR bool
- max() throw() { return true; }
+ max() _GLIBCXX_USE_NOEXCEPT { return true; }
#ifdef __GXX_EXPERIMENTAL_CXX0X__
static constexpr bool
- lowest() throw() { return min(); }
+ lowest() noexcept { return min(); }
#endif
static _GLIBCXX_USE_CONSTEXPR int digits = 1;
static _GLIBCXX_USE_CONSTEXPR int digits10 = 0;
@@ -393,10 +393,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
static _GLIBCXX_USE_CONSTEXPR int radix = 2;
static _GLIBCXX_CONSTEXPR bool
- epsilon() throw() { return false; }
+ epsilon() _GLIBCXX_USE_NOEXCEPT { return false; }
static _GLIBCXX_CONSTEXPR bool
- round_error() throw() { return false; }
+ round_error() _GLIBCXX_USE_NOEXCEPT { return false; }
static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0;
static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0;
@@ -411,16 +411,16 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false;
static _GLIBCXX_CONSTEXPR bool
- infinity() throw() { return false; }
+ infinity() _GLIBCXX_USE_NOEXCEPT { return false; }
static _GLIBCXX_CONSTEXPR bool
- quiet_NaN() throw() { return false; }
+ quiet_NaN() _GLIBCXX_USE_NOEXCEPT { return false; }
static _GLIBCXX_CONSTEXPR bool
- signaling_NaN() throw() { return false; }
+ signaling_NaN() _GLIBCXX_USE_NOEXCEPT { return false; }
static _GLIBCXX_CONSTEXPR bool
- denorm_min() throw() { return false; }
+ denorm_min() _GLIBCXX_USE_NOEXCEPT { return false; }
static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false;
static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true;
@@ -442,14 +442,14 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true;
static _GLIBCXX_CONSTEXPR char
- min() throw() { return __glibcxx_min(char); }
+ min() _GLIBCXX_USE_NOEXCEPT { return __glibcxx_min(char); }
static _GLIBCXX_CONSTEXPR char
- max() throw() { return __glibcxx_max(char); }
+ max() _GLIBCXX_USE_NOEXCEPT { return __glibcxx_max(char); }
#ifdef __GXX_EXPERIMENTAL_CXX0X__
static constexpr char
- lowest() throw() { return min(); }
+ lowest() noexcept { return min(); }
#endif
static _GLIBCXX_USE_CONSTEXPR int digits = __glibcxx_digits (char);
@@ -463,10 +463,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
static _GLIBCXX_USE_CONSTEXPR int radix = 2;
static _GLIBCXX_CONSTEXPR char
- epsilon() throw() { return 0; }
+ epsilon() _GLIBCXX_USE_NOEXCEPT { return 0; }
static _GLIBCXX_CONSTEXPR char
- round_error() throw() { return 0; }
+ round_error() _GLIBCXX_USE_NOEXCEPT { return 0; }
static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0;
static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0;
@@ -481,16 +481,16 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false;
static _GLIBCXX_CONSTEXPR
- char infinity() throw() { return char(); }
+ char infinity() _GLIBCXX_USE_NOEXCEPT { return char(); }
static _GLIBCXX_CONSTEXPR char
- quiet_NaN() throw() { return char(); }
+ quiet_NaN() _GLIBCXX_USE_NOEXCEPT { return char(); }
static _GLIBCXX_CONSTEXPR char
- signaling_NaN() throw() { return char(); }
+ signaling_NaN() _GLIBCXX_USE_NOEXCEPT { return char(); }
static _GLIBCXX_CONSTEXPR char
- denorm_min() throw() { return static_cast<char>(0); }
+ denorm_min() _GLIBCXX_USE_NOEXCEPT { return static_cast<char>(0); }
static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false;
static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true;
@@ -509,14 +509,14 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true;
static _GLIBCXX_CONSTEXPR signed char
- min() throw() { return -__SCHAR_MAX__ - 1; }
+ min() _GLIBCXX_USE_NOEXCEPT { return -__SCHAR_MAX__ - 1; }
static _GLIBCXX_CONSTEXPR signed char
- max() throw() { return __SCHAR_MAX__; }
+ max() _GLIBCXX_USE_NOEXCEPT { return __SCHAR_MAX__; }
#ifdef __GXX_EXPERIMENTAL_CXX0X__
static constexpr signed char
- lowest() throw() { return min(); }
+ lowest() noexcept { return min(); }
#endif
static _GLIBCXX_USE_CONSTEXPR int digits = __glibcxx_digits (signed char);
@@ -531,10 +531,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
static _GLIBCXX_USE_CONSTEXPR int radix = 2;
static _GLIBCXX_CONSTEXPR signed char
- epsilon() throw() { return 0; }
+ epsilon() _GLIBCXX_USE_NOEXCEPT { return 0; }
static _GLIBCXX_CONSTEXPR signed char
- round_error() throw() { return 0; }
+ round_error() _GLIBCXX_USE_NOEXCEPT { return 0; }
static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0;
static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0;
@@ -549,16 +549,18 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false;
static _GLIBCXX_CONSTEXPR signed char
- infinity() throw() { return static_cast<signed char>(0); }
+ infinity() _GLIBCXX_USE_NOEXCEPT { return static_cast<signed char>(0); }
static _GLIBCXX_CONSTEXPR signed char
- quiet_NaN() throw() { return static_cast<signed char>(0); }
+ quiet_NaN() _GLIBCXX_USE_NOEXCEPT { return static_cast<signed char>(0); }
static _GLIBCXX_CONSTEXPR signed char
- signaling_NaN() throw() { return static_cast<signed char>(0); }
+ signaling_NaN() _GLIBCXX_USE_NOEXCEPT
+ { return static_cast<signed char>(0); }
static _GLIBCXX_CONSTEXPR signed char
- denorm_min() throw() { return static_cast<signed char>(0); }
+ denorm_min() _GLIBCXX_USE_NOEXCEPT
+ { return static_cast<signed char>(0); }
static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false;
static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true;
@@ -577,14 +579,14 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true;
static _GLIBCXX_CONSTEXPR unsigned char
- min() throw() { return 0; }
+ min() _GLIBCXX_USE_NOEXCEPT { return 0; }
static _GLIBCXX_CONSTEXPR unsigned char
- max() throw() { return __SCHAR_MAX__ * 2U + 1; }
+ max() _GLIBCXX_USE_NOEXCEPT { return __SCHAR_MAX__ * 2U + 1; }
#ifdef __GXX_EXPERIMENTAL_CXX0X__
static constexpr unsigned char
- lowest() throw() { return min(); }
+ lowest() noexcept { return min(); }
#endif
static _GLIBCXX_USE_CONSTEXPR int digits
@@ -600,10 +602,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
static _GLIBCXX_USE_CONSTEXPR int radix = 2;
static _GLIBCXX_CONSTEXPR unsigned char
- epsilon() throw() { return 0; }
+ epsilon() _GLIBCXX_USE_NOEXCEPT { return 0; }
static _GLIBCXX_CONSTEXPR unsigned char
- round_error() throw() { return 0; }
+ round_error() _GLIBCXX_USE_NOEXCEPT { return 0; }
static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0;
static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0;
@@ -618,16 +620,20 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false;
static _GLIBCXX_CONSTEXPR unsigned char
- infinity() throw() { return static_cast<unsigned char>(0); }
+ infinity() _GLIBCXX_USE_NOEXCEPT
+ { return static_cast<unsigned char>(0); }
static _GLIBCXX_CONSTEXPR unsigned char
- quiet_NaN() throw() { return static_cast<unsigned char>(0); }
+ quiet_NaN() _GLIBCXX_USE_NOEXCEPT
+ { return static_cast<unsigned char>(0); }
static _GLIBCXX_CONSTEXPR unsigned char
- signaling_NaN() throw() { return static_cast<unsigned char>(0); }
+ signaling_NaN() _GLIBCXX_USE_NOEXCEPT
+ { return static_cast<unsigned char>(0); }
static _GLIBCXX_CONSTEXPR unsigned char
- denorm_min() throw() { return static_cast<unsigned char>(0); }
+ denorm_min() _GLIBCXX_USE_NOEXCEPT
+ { return static_cast<unsigned char>(0); }
static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false;
static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true;
@@ -646,14 +652,14 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true;
static _GLIBCXX_CONSTEXPR wchar_t
- min() throw() { return __glibcxx_min (wchar_t); }
+ min() _GLIBCXX_USE_NOEXCEPT { return __glibcxx_min (wchar_t); }
static _GLIBCXX_CONSTEXPR wchar_t
- max() throw() { return __glibcxx_max (wchar_t); }
+ max() _GLIBCXX_USE_NOEXCEPT { return __glibcxx_max (wchar_t); }
#ifdef __GXX_EXPERIMENTAL_CXX0X__
- static constexpr wchar_t
- lowest() throw() { return min(); }
+ static constexpr wchar_t
+ lowest() noexcept { return min(); }
#endif
static _GLIBCXX_USE_CONSTEXPR int digits = __glibcxx_digits (wchar_t);
@@ -668,10 +674,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
static _GLIBCXX_USE_CONSTEXPR int radix = 2;
static _GLIBCXX_CONSTEXPR wchar_t
- epsilon() throw() { return 0; }
+ epsilon() _GLIBCXX_USE_NOEXCEPT { return 0; }
static _GLIBCXX_CONSTEXPR wchar_t
- round_error() throw() { return 0; }
+ round_error() _GLIBCXX_USE_NOEXCEPT { return 0; }
static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0;
static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0;
@@ -686,16 +692,16 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false;
static _GLIBCXX_CONSTEXPR wchar_t
- infinity() throw() { return wchar_t(); }
+ infinity() _GLIBCXX_USE_NOEXCEPT { return wchar_t(); }
static _GLIBCXX_CONSTEXPR wchar_t
- quiet_NaN() throw() { return wchar_t(); }
+ quiet_NaN() _GLIBCXX_USE_NOEXCEPT { return wchar_t(); }
static _GLIBCXX_CONSTEXPR wchar_t
- signaling_NaN() throw() { return wchar_t(); }
+ signaling_NaN() _GLIBCXX_USE_NOEXCEPT { return wchar_t(); }
static _GLIBCXX_CONSTEXPR wchar_t
- denorm_min() throw() { return wchar_t(); }
+ denorm_min() _GLIBCXX_USE_NOEXCEPT { return wchar_t(); }
static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false;
static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true;
@@ -712,139 +718,122 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
template<>
struct numeric_limits<char16_t>
{
- static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true;
+ static constexpr bool is_specialized = true;
- static _GLIBCXX_CONSTEXPR char16_t
- min() throw() { return __glibcxx_min (char16_t); }
+ static constexpr char16_t
+ min() noexcept { return __glibcxx_min (char16_t); }
- static _GLIBCXX_CONSTEXPR char16_t
- max() throw() { return __glibcxx_max (char16_t); }
+ static constexpr char16_t
+ max() noexcept { return __glibcxx_max (char16_t); }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
static constexpr char16_t
- lowest() throw() { return min(); }
-#endif
+ lowest() noexcept { return min(); }
- static _GLIBCXX_USE_CONSTEXPR int digits
- = __glibcxx_digits (char16_t);
- static _GLIBCXX_USE_CONSTEXPR int digits10
- = __glibcxx_digits10 (char16_t);
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ static constexpr int digits = __glibcxx_digits (char16_t);
+ static constexpr int digits10 = __glibcxx_digits10 (char16_t);
static constexpr int max_digits10 = 0;
-#endif
- static _GLIBCXX_USE_CONSTEXPR bool is_signed
- = __glibcxx_signed (char16_t);
- static _GLIBCXX_USE_CONSTEXPR bool is_integer = true;
- static _GLIBCXX_USE_CONSTEXPR bool is_exact = true;
- static _GLIBCXX_USE_CONSTEXPR int radix = 2;
+ static constexpr bool is_signed = __glibcxx_signed (char16_t);
+ static constexpr bool is_integer = true;
+ static constexpr bool is_exact = true;
+ static constexpr int radix = 2;
- static _GLIBCXX_CONSTEXPR char16_t
- epsilon() throw() { return 0; }
+ static constexpr char16_t
+ epsilon() noexcept { return 0; }
- static _GLIBCXX_CONSTEXPR char16_t
- round_error() throw() { return 0; }
+ static constexpr char16_t
+ round_error() noexcept { return 0; }
- static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0;
- static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0;
- static _GLIBCXX_USE_CONSTEXPR int max_exponent = 0;
- static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = 0;
+ static constexpr int min_exponent = 0;
+ static constexpr int min_exponent10 = 0;
+ static constexpr int max_exponent = 0;
+ static constexpr int max_exponent10 = 0;
- static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false;
- static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false;
- static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false;
- static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm
- = denorm_absent;
- static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false;
+ static constexpr bool has_infinity = false;
+ static constexpr bool has_quiet_NaN = false;
+ static constexpr bool has_signaling_NaN = false;
+ static constexpr float_denorm_style has_denorm = denorm_absent;
+ static constexpr bool has_denorm_loss = false;
- static _GLIBCXX_CONSTEXPR char16_t
- infinity() throw() { return char16_t(); }
+ static constexpr char16_t
+ infinity() noexcept { return char16_t(); }
- static _GLIBCXX_CONSTEXPR char16_t
- quiet_NaN() throw() { return char16_t(); }
+ static constexpr char16_t
+ quiet_NaN() noexcept { return char16_t(); }
- static _GLIBCXX_CONSTEXPR char16_t
- signaling_NaN() throw() { return char16_t(); }
+ static constexpr char16_t
+ signaling_NaN() noexcept { return char16_t(); }
- static _GLIBCXX_CONSTEXPR char16_t
- denorm_min() throw() { return char16_t(); }
+ static constexpr char16_t
+ denorm_min() noexcept { return char16_t(); }
- static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false;
- static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true;
- static _GLIBCXX_USE_CONSTEXPR bool is_modulo = true;
+ static constexpr bool is_iec559 = false;
+ static constexpr bool is_bounded = true;
+ static constexpr bool is_modulo = true;
- static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_integral_traps;
- static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false;
- static _GLIBCXX_USE_CONSTEXPR float_round_style round_style
- = round_toward_zero;
+ static constexpr bool traps = __glibcxx_integral_traps;
+ static constexpr bool tinyness_before = false;
+ static constexpr float_round_style round_style = round_toward_zero;
};
/// numeric_limits<char32_t> specialization.
template<>
struct numeric_limits<char32_t>
{
- static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true;
+ static constexpr bool is_specialized = true;
- static _GLIBCXX_CONSTEXPR char32_t
- min() throw() { return __glibcxx_min (char32_t); }
+ static constexpr char32_t
+ min() noexcept { return __glibcxx_min (char32_t); }
- static _GLIBCXX_CONSTEXPR char32_t
- max() throw() { return __glibcxx_max (char32_t); }
+ static constexpr char32_t
+ max() noexcept { return __glibcxx_max (char32_t); }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
static constexpr char32_t
- lowest() throw() { return min(); }
-#endif
+ lowest() noexcept { return min(); }
- static _GLIBCXX_USE_CONSTEXPR int digits = __glibcxx_digits (char32_t);
- static _GLIBCXX_USE_CONSTEXPR int digits10
- = __glibcxx_digits10 (char32_t);
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ static constexpr int digits = __glibcxx_digits (char32_t);
+ static constexpr int digits10 = __glibcxx_digits10 (char32_t);
static constexpr int max_digits10 = 0;
-#endif
- static _GLIBCXX_USE_CONSTEXPR bool is_signed
- = __glibcxx_signed (char32_t);
- static _GLIBCXX_USE_CONSTEXPR bool is_integer = true;
- static _GLIBCXX_USE_CONSTEXPR bool is_exact = true;
- static _GLIBCXX_USE_CONSTEXPR int radix = 2;
+ static constexpr bool is_signed = __glibcxx_signed (char32_t);
+ static constexpr bool is_integer = true;
+ static constexpr bool is_exact = true;
+ static constexpr int radix = 2;
- static _GLIBCXX_CONSTEXPR char32_t
- epsilon() throw() { return 0; }
+ static constexpr char32_t
+ epsilon() noexcept { return 0; }
- static _GLIBCXX_CONSTEXPR char32_t
- round_error() throw() { return 0; }
+ static constexpr char32_t
+ round_error() noexcept { return 0; }
- static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0;
- static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0;
- static _GLIBCXX_USE_CONSTEXPR int max_exponent = 0;
- static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = 0;
+ static constexpr int min_exponent = 0;
+ static constexpr int min_exponent10 = 0;
+ static constexpr int max_exponent = 0;
+ static constexpr int max_exponent10 = 0;
- static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false;
- static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false;
- static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false;
- static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm
- = denorm_absent;
- static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false;
+ static constexpr bool has_infinity = false;
+ static constexpr bool has_quiet_NaN = false;
+ static constexpr bool has_signaling_NaN = false;
+ static constexpr float_denorm_style has_denorm = denorm_absent;
+ static constexpr bool has_denorm_loss = false;
- static _GLIBCXX_CONSTEXPR char32_t
- infinity() throw() { return char32_t(); }
+ static constexpr char32_t
+ infinity() noexcept { return char32_t(); }
- static _GLIBCXX_CONSTEXPR char32_t
- quiet_NaN() throw() { return char32_t(); }
+ static constexpr char32_t
+ quiet_NaN() noexcept { return char32_t(); }
- static _GLIBCXX_CONSTEXPR char32_t
- signaling_NaN() throw() { return char32_t(); }
+ static constexpr char32_t
+ signaling_NaN() noexcept { return char32_t(); }
- static _GLIBCXX_CONSTEXPR char32_t
- denorm_min() throw() { return char32_t(); }
+ static constexpr char32_t
+ denorm_min() noexcept { return char32_t(); }
- static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false;
- static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true;
- static _GLIBCXX_USE_CONSTEXPR bool is_modulo = true;
+ static constexpr bool is_iec559 = false;
+ static constexpr bool is_bounded = true;
+ static constexpr bool is_modulo = true;
- static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_integral_traps;
- static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false;
- static _GLIBCXX_USE_CONSTEXPR float_round_style round_style
- = round_toward_zero;
+ static constexpr bool traps = __glibcxx_integral_traps;
+ static constexpr bool tinyness_before = false;
+ static constexpr float_round_style round_style = round_toward_zero;
};
#endif
@@ -855,14 +844,14 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true;
static _GLIBCXX_CONSTEXPR short
- min() throw() { return -__SHRT_MAX__ - 1; }
+ min() _GLIBCXX_USE_NOEXCEPT { return -__SHRT_MAX__ - 1; }
static _GLIBCXX_CONSTEXPR short
- max() throw() { return __SHRT_MAX__; }
+ max() _GLIBCXX_USE_NOEXCEPT { return __SHRT_MAX__; }
#ifdef __GXX_EXPERIMENTAL_CXX0X__
static constexpr short
- lowest() throw() { return min(); }
+ lowest() noexcept { return min(); }
#endif
static _GLIBCXX_USE_CONSTEXPR int digits = __glibcxx_digits (short);
@@ -876,10 +865,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
static _GLIBCXX_USE_CONSTEXPR int radix = 2;
static _GLIBCXX_CONSTEXPR short
- epsilon() throw() { return 0; }
+ epsilon() _GLIBCXX_USE_NOEXCEPT { return 0; }
static _GLIBCXX_CONSTEXPR short
- round_error() throw() { return 0; }
+ round_error() _GLIBCXX_USE_NOEXCEPT { return 0; }
static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0;
static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0;
@@ -894,16 +883,16 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false;
static _GLIBCXX_CONSTEXPR short
- infinity() throw() { return short(); }
+ infinity() _GLIBCXX_USE_NOEXCEPT { return short(); }
static _GLIBCXX_CONSTEXPR short
- quiet_NaN() throw() { return short(); }
+ quiet_NaN() _GLIBCXX_USE_NOEXCEPT { return short(); }
static _GLIBCXX_CONSTEXPR short
- signaling_NaN() throw() { return short(); }
+ signaling_NaN() _GLIBCXX_USE_NOEXCEPT { return short(); }
static _GLIBCXX_CONSTEXPR short
- denorm_min() throw() { return short(); }
+ denorm_min() _GLIBCXX_USE_NOEXCEPT { return short(); }
static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false;
static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true;
@@ -922,14 +911,14 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true;
static _GLIBCXX_CONSTEXPR unsigned short
- min() throw() { return 0; }
+ min() _GLIBCXX_USE_NOEXCEPT { return 0; }
static _GLIBCXX_CONSTEXPR unsigned short
- max() throw() { return __SHRT_MAX__ * 2U + 1; }
+ max() _GLIBCXX_USE_NOEXCEPT { return __SHRT_MAX__ * 2U + 1; }
#ifdef __GXX_EXPERIMENTAL_CXX0X__
static constexpr unsigned short
- lowest() throw() { return min(); }
+ lowest() noexcept { return min(); }
#endif
static _GLIBCXX_USE_CONSTEXPR int digits
@@ -945,10 +934,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
static _GLIBCXX_USE_CONSTEXPR int radix = 2;
static _GLIBCXX_CONSTEXPR unsigned short
- epsilon() throw() { return 0; }
+ epsilon() _GLIBCXX_USE_NOEXCEPT { return 0; }
static _GLIBCXX_CONSTEXPR unsigned short
- round_error() throw() { return 0; }
+ round_error() _GLIBCXX_USE_NOEXCEPT { return 0; }
static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0;
static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0;
@@ -963,16 +952,20 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false;
static _GLIBCXX_CONSTEXPR unsigned short
- infinity() throw() { return static_cast<unsigned short>(0); }
+ infinity() _GLIBCXX_USE_NOEXCEPT
+ { return static_cast<unsigned short>(0); }
static _GLIBCXX_CONSTEXPR unsigned short
- quiet_NaN() throw() { return static_cast<unsigned short>(0); }
+ quiet_NaN() _GLIBCXX_USE_NOEXCEPT
+ { return static_cast<unsigned short>(0); }
static _GLIBCXX_CONSTEXPR unsigned short
- signaling_NaN() throw() { return static_cast<unsigned short>(0); }
+ signaling_NaN() _GLIBCXX_USE_NOEXCEPT
+ { return static_cast<unsigned short>(0); }
static _GLIBCXX_CONSTEXPR unsigned short
- denorm_min() throw() { return static_cast<unsigned short>(0); }
+ denorm_min() _GLIBCXX_USE_NOEXCEPT
+ { return static_cast<unsigned short>(0); }
static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false;
static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true;
@@ -991,14 +984,14 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true;
static _GLIBCXX_CONSTEXPR int
- min() throw() { return -__INT_MAX__ - 1; }
+ min() _GLIBCXX_USE_NOEXCEPT { return -__INT_MAX__ - 1; }
static _GLIBCXX_CONSTEXPR int
- max() throw() { return __INT_MAX__; }
+ max() _GLIBCXX_USE_NOEXCEPT { return __INT_MAX__; }
#ifdef __GXX_EXPERIMENTAL_CXX0X__
static constexpr int
- lowest() throw() { return min(); }
+ lowest() noexcept { return min(); }
#endif
static _GLIBCXX_USE_CONSTEXPR int digits = __glibcxx_digits (int);
@@ -1012,10 +1005,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
static _GLIBCXX_USE_CONSTEXPR int radix = 2;
static _GLIBCXX_CONSTEXPR int
- epsilon() throw() { return 0; }
+ epsilon() _GLIBCXX_USE_NOEXCEPT { return 0; }
static _GLIBCXX_CONSTEXPR int
- round_error() throw() { return 0; }
+ round_error() _GLIBCXX_USE_NOEXCEPT { return 0; }
static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0;
static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0;
@@ -1030,16 +1023,16 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false;
static _GLIBCXX_CONSTEXPR int
- infinity() throw() { return static_cast<int>(0); }
+ infinity() _GLIBCXX_USE_NOEXCEPT { return static_cast<int>(0); }
static _GLIBCXX_CONSTEXPR int
- quiet_NaN() throw() { return static_cast<int>(0); }
+ quiet_NaN() _GLIBCXX_USE_NOEXCEPT { return static_cast<int>(0); }
static _GLIBCXX_CONSTEXPR int
- signaling_NaN() throw() { return static_cast<int>(0); }
+ signaling_NaN() _GLIBCXX_USE_NOEXCEPT { return static_cast<int>(0); }
static _GLIBCXX_CONSTEXPR int
- denorm_min() throw() { return static_cast<int>(0); }
+ denorm_min() _GLIBCXX_USE_NOEXCEPT { return static_cast<int>(0); }
static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false;
static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true;
@@ -1058,14 +1051,14 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true;
static _GLIBCXX_CONSTEXPR unsigned int
- min() throw() { return 0; }
+ min() _GLIBCXX_USE_NOEXCEPT { return 0; }
static _GLIBCXX_CONSTEXPR unsigned int
- max() throw() { return __INT_MAX__ * 2U + 1; }
+ max() _GLIBCXX_USE_NOEXCEPT { return __INT_MAX__ * 2U + 1; }
#ifdef __GXX_EXPERIMENTAL_CXX0X__
static constexpr unsigned int
- lowest() throw() { return min(); }
+ lowest() noexcept { return min(); }
#endif
static _GLIBCXX_USE_CONSTEXPR int digits
@@ -1081,10 +1074,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
static _GLIBCXX_USE_CONSTEXPR int radix = 2;
static _GLIBCXX_CONSTEXPR unsigned int
- epsilon() throw() { return 0; }
+ epsilon() _GLIBCXX_USE_NOEXCEPT { return 0; }
static _GLIBCXX_CONSTEXPR unsigned int
- round_error() throw() { return 0; }
+ round_error() _GLIBCXX_USE_NOEXCEPT { return 0; }
static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0;
static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0;
@@ -1099,16 +1092,19 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false;
static _GLIBCXX_CONSTEXPR unsigned int
- infinity() throw() { return static_cast<unsigned int>(0); }
+ infinity() _GLIBCXX_USE_NOEXCEPT { return static_cast<unsigned int>(0); }
static _GLIBCXX_CONSTEXPR unsigned int
- quiet_NaN() throw() { return static_cast<unsigned int>(0); }
+ quiet_NaN() _GLIBCXX_USE_NOEXCEPT
+ { return static_cast<unsigned int>(0); }
static _GLIBCXX_CONSTEXPR unsigned int
- signaling_NaN() throw() { return static_cast<unsigned int>(0); }
+ signaling_NaN() _GLIBCXX_USE_NOEXCEPT
+ { return static_cast<unsigned int>(0); }
static _GLIBCXX_CONSTEXPR unsigned int
- denorm_min() throw() { return static_cast<unsigned int>(0); }
+ denorm_min() _GLIBCXX_USE_NOEXCEPT
+ { return static_cast<unsigned int>(0); }
static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false;
static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true;
@@ -1127,14 +1123,14 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true;
static _GLIBCXX_CONSTEXPR long
- min() throw() { return -__LONG_MAX__ - 1; }
+ min() _GLIBCXX_USE_NOEXCEPT { return -__LONG_MAX__ - 1; }
static _GLIBCXX_CONSTEXPR long
- max() throw() { return __LONG_MAX__; }
+ max() _GLIBCXX_USE_NOEXCEPT { return __LONG_MAX__; }
#ifdef __GXX_EXPERIMENTAL_CXX0X__
static constexpr long
- lowest() throw() { return min(); }
+ lowest() noexcept { return min(); }
#endif
static _GLIBCXX_USE_CONSTEXPR int digits = __glibcxx_digits (long);
@@ -1148,10 +1144,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
static _GLIBCXX_USE_CONSTEXPR int radix = 2;
static _GLIBCXX_CONSTEXPR long
- epsilon() throw() { return 0; }
+ epsilon() _GLIBCXX_USE_NOEXCEPT { return 0; }
static _GLIBCXX_CONSTEXPR long
- round_error() throw() { return 0; }
+ round_error() _GLIBCXX_USE_NOEXCEPT { return 0; }
static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0;
static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0;
@@ -1166,16 +1162,16 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false;
static _GLIBCXX_CONSTEXPR long
- infinity() throw() { return static_cast<long>(0); }
+ infinity() _GLIBCXX_USE_NOEXCEPT { return static_cast<long>(0); }
static _GLIBCXX_CONSTEXPR long
- quiet_NaN() throw() { return static_cast<long>(0); }
+ quiet_NaN() _GLIBCXX_USE_NOEXCEPT { return static_cast<long>(0); }
static _GLIBCXX_CONSTEXPR long
- signaling_NaN() throw() { return static_cast<long>(0); }
+ signaling_NaN() _GLIBCXX_USE_NOEXCEPT { return static_cast<long>(0); }
static _GLIBCXX_CONSTEXPR long
- denorm_min() throw() { return static_cast<long>(0); }
+ denorm_min() _GLIBCXX_USE_NOEXCEPT { return static_cast<long>(0); }
static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false;
static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true;
@@ -1194,14 +1190,14 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true;
static _GLIBCXX_CONSTEXPR unsigned long
- min() throw() { return 0; }
+ min() _GLIBCXX_USE_NOEXCEPT { return 0; }
static _GLIBCXX_CONSTEXPR unsigned long
- max() throw() { return __LONG_MAX__ * 2UL + 1; }
+ max() _GLIBCXX_USE_NOEXCEPT { return __LONG_MAX__ * 2UL + 1; }
#ifdef __GXX_EXPERIMENTAL_CXX0X__
static constexpr unsigned long
- lowest() throw() { return min(); }
+ lowest() noexcept { return min(); }
#endif
static _GLIBCXX_USE_CONSTEXPR int digits
@@ -1217,10 +1213,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
static _GLIBCXX_USE_CONSTEXPR int radix = 2;
static _GLIBCXX_CONSTEXPR unsigned long
- epsilon() throw() { return 0; }
+ epsilon() _GLIBCXX_USE_NOEXCEPT { return 0; }
static _GLIBCXX_CONSTEXPR unsigned long
- round_error() throw() { return 0; }
+ round_error() _GLIBCXX_USE_NOEXCEPT { return 0; }
static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0;
static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0;
@@ -1235,16 +1231,20 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false;
static _GLIBCXX_CONSTEXPR unsigned long
- infinity() throw() { return static_cast<unsigned long>(0); }
+ infinity() _GLIBCXX_USE_NOEXCEPT
+ { return static_cast<unsigned long>(0); }
static _GLIBCXX_CONSTEXPR unsigned long
- quiet_NaN() throw() { return static_cast<unsigned long>(0); }
+ quiet_NaN() _GLIBCXX_USE_NOEXCEPT
+ { return static_cast<unsigned long>(0); }
static _GLIBCXX_CONSTEXPR unsigned long
- signaling_NaN() throw() { return static_cast<unsigned long>(0); }
+ signaling_NaN() _GLIBCXX_USE_NOEXCEPT
+ { return static_cast<unsigned long>(0); }
static _GLIBCXX_CONSTEXPR unsigned long
- denorm_min() throw() { return static_cast<unsigned long>(0); }
+ denorm_min() _GLIBCXX_USE_NOEXCEPT
+ { return static_cast<unsigned long>(0); }
static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false;
static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true;
@@ -1263,14 +1263,14 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true;
static _GLIBCXX_CONSTEXPR long long
- min() throw() { return -__LONG_LONG_MAX__ - 1; }
+ min() _GLIBCXX_USE_NOEXCEPT { return -__LONG_LONG_MAX__ - 1; }
static _GLIBCXX_CONSTEXPR long long
- max() throw() { return __LONG_LONG_MAX__; }
+ max() _GLIBCXX_USE_NOEXCEPT { return __LONG_LONG_MAX__; }
#ifdef __GXX_EXPERIMENTAL_CXX0X__
static constexpr long long
- lowest() throw() { return min(); }
+ lowest() noexcept { return min(); }
#endif
static _GLIBCXX_USE_CONSTEXPR int digits
@@ -1286,10 +1286,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
static _GLIBCXX_USE_CONSTEXPR int radix = 2;
static _GLIBCXX_CONSTEXPR long long
- epsilon() throw() { return 0; }
+ epsilon() _GLIBCXX_USE_NOEXCEPT { return 0; }
static _GLIBCXX_CONSTEXPR long long
- round_error() throw() { return 0; }
+ round_error() _GLIBCXX_USE_NOEXCEPT { return 0; }
static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0;
static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0;
@@ -1304,16 +1304,17 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false;
static _GLIBCXX_CONSTEXPR long long
- infinity() throw() { return static_cast<long long>(0); }
+ infinity() _GLIBCXX_USE_NOEXCEPT { return static_cast<long long>(0); }
static _GLIBCXX_CONSTEXPR long long
- quiet_NaN() throw() { return static_cast<long long>(0); }
+ quiet_NaN() _GLIBCXX_USE_NOEXCEPT { return static_cast<long long>(0); }
static _GLIBCXX_CONSTEXPR long long
- signaling_NaN() throw() { return static_cast<long long>(0); }
+ signaling_NaN() _GLIBCXX_USE_NOEXCEPT
+ { return static_cast<long long>(0); }
static _GLIBCXX_CONSTEXPR long long
- denorm_min() throw() { return static_cast<long long>(0); }
+ denorm_min() _GLIBCXX_USE_NOEXCEPT { return static_cast<long long>(0); }
static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false;
static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true;
@@ -1332,14 +1333,14 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true;
static _GLIBCXX_CONSTEXPR unsigned long long
- min() throw() { return 0; }
+ min() _GLIBCXX_USE_NOEXCEPT { return 0; }
static _GLIBCXX_CONSTEXPR unsigned long long
- max() throw() { return __LONG_LONG_MAX__ * 2ULL + 1; }
+ max() _GLIBCXX_USE_NOEXCEPT { return __LONG_LONG_MAX__ * 2ULL + 1; }
#ifdef __GXX_EXPERIMENTAL_CXX0X__
static constexpr unsigned long long
- lowest() throw() { return min(); }
+ lowest() noexcept { return min(); }
#endif
static _GLIBCXX_USE_CONSTEXPR int digits
@@ -1355,10 +1356,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
static _GLIBCXX_USE_CONSTEXPR int radix = 2;
static _GLIBCXX_CONSTEXPR unsigned long long
- epsilon() throw() { return 0; }
+ epsilon() _GLIBCXX_USE_NOEXCEPT { return 0; }
static _GLIBCXX_CONSTEXPR unsigned long long
- round_error() throw() { return 0; }
+ round_error() _GLIBCXX_USE_NOEXCEPT { return 0; }
static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0;
static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0;
@@ -1373,16 +1374,20 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false;
static _GLIBCXX_CONSTEXPR unsigned long long
- infinity() throw() { return static_cast<unsigned long long>(0); }
+ infinity() _GLIBCXX_USE_NOEXCEPT
+ { return static_cast<unsigned long long>(0); }
static _GLIBCXX_CONSTEXPR unsigned long long
- quiet_NaN() throw() { return static_cast<unsigned long long>(0); }
+ quiet_NaN() _GLIBCXX_USE_NOEXCEPT
+ { return static_cast<unsigned long long>(0); }
static _GLIBCXX_CONSTEXPR unsigned long long
- signaling_NaN() throw() { return static_cast<unsigned long long>(0); }
+ signaling_NaN() _GLIBCXX_USE_NOEXCEPT
+ { return static_cast<unsigned long long>(0); }
static _GLIBCXX_CONSTEXPR unsigned long long
- denorm_min() throw() { return static_cast<unsigned long long>(0); }
+ denorm_min() _GLIBCXX_USE_NOEXCEPT
+ { return static_cast<unsigned long long>(0); }
static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false;
static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true;
@@ -1401,14 +1406,14 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true;
static _GLIBCXX_CONSTEXPR float
- min() throw() { return __FLT_MIN__; }
+ min() _GLIBCXX_USE_NOEXCEPT { return __FLT_MIN__; }
static _GLIBCXX_CONSTEXPR float
- max() throw() { return __FLT_MAX__; }
+ max() _GLIBCXX_USE_NOEXCEPT { return __FLT_MAX__; }
#ifdef __GXX_EXPERIMENTAL_CXX0X__
static constexpr float
- lowest() throw() { return -__FLT_MAX__; }
+ lowest() noexcept { return -__FLT_MAX__; }
#endif
static _GLIBCXX_USE_CONSTEXPR int digits = __FLT_MANT_DIG__;
@@ -1423,10 +1428,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
static _GLIBCXX_USE_CONSTEXPR int radix = __FLT_RADIX__;
static _GLIBCXX_CONSTEXPR float
- epsilon() throw() { return __FLT_EPSILON__; }
+ epsilon() _GLIBCXX_USE_NOEXCEPT { return __FLT_EPSILON__; }
static _GLIBCXX_CONSTEXPR float
- round_error() throw() { return 0.5F; }
+ round_error() _GLIBCXX_USE_NOEXCEPT { return 0.5F; }
static _GLIBCXX_USE_CONSTEXPR int min_exponent = __FLT_MIN_EXP__;
static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = __FLT_MIN_10_EXP__;
@@ -1442,16 +1447,16 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
= __glibcxx_float_has_denorm_loss;
static _GLIBCXX_CONSTEXPR float
- infinity() throw() { return __builtin_huge_valf (); }
+ infinity() _GLIBCXX_USE_NOEXCEPT { return __builtin_huge_valf(); }
static _GLIBCXX_CONSTEXPR float
- quiet_NaN() throw() { return __builtin_nanf (""); }
+ quiet_NaN() _GLIBCXX_USE_NOEXCEPT { return __builtin_nanf(""); }
static _GLIBCXX_CONSTEXPR float
- signaling_NaN() throw() { return __builtin_nansf (""); }
+ signaling_NaN() _GLIBCXX_USE_NOEXCEPT { return __builtin_nansf(""); }
static _GLIBCXX_CONSTEXPR float
- denorm_min() throw() { return __FLT_DENORM_MIN__; }
+ denorm_min() _GLIBCXX_USE_NOEXCEPT { return __FLT_DENORM_MIN__; }
static _GLIBCXX_USE_CONSTEXPR bool is_iec559
= has_infinity && has_quiet_NaN && has_denorm == denorm_present;
@@ -1476,14 +1481,14 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true;
static _GLIBCXX_CONSTEXPR double
- min() throw() { return __DBL_MIN__; }
+ min() _GLIBCXX_USE_NOEXCEPT { return __DBL_MIN__; }
static _GLIBCXX_CONSTEXPR double
- max() throw() { return __DBL_MAX__; }
+ max() _GLIBCXX_USE_NOEXCEPT { return __DBL_MAX__; }
#ifdef __GXX_EXPERIMENTAL_CXX0X__
static constexpr double
- lowest() throw() { return -__DBL_MAX__; }
+ lowest() noexcept { return -__DBL_MAX__; }
#endif
static _GLIBCXX_USE_CONSTEXPR int digits = __DBL_MANT_DIG__;
@@ -1498,10 +1503,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
static _GLIBCXX_USE_CONSTEXPR int radix = __FLT_RADIX__;
static _GLIBCXX_CONSTEXPR double
- epsilon() throw() { return __DBL_EPSILON__; }
+ epsilon() _GLIBCXX_USE_NOEXCEPT { return __DBL_EPSILON__; }
static _GLIBCXX_CONSTEXPR double
- round_error() throw() { return 0.5; }
+ round_error() _GLIBCXX_USE_NOEXCEPT { return 0.5; }
static _GLIBCXX_USE_CONSTEXPR int min_exponent = __DBL_MIN_EXP__;
static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = __DBL_MIN_10_EXP__;
@@ -1517,16 +1522,16 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
= __glibcxx_double_has_denorm_loss;
static _GLIBCXX_CONSTEXPR double
- infinity() throw() { return __builtin_huge_val(); }
+ infinity() _GLIBCXX_USE_NOEXCEPT { return __builtin_huge_val(); }
static _GLIBCXX_CONSTEXPR double
- quiet_NaN() throw() { return __builtin_nan (""); }
+ quiet_NaN() _GLIBCXX_USE_NOEXCEPT { return __builtin_nan(""); }
static _GLIBCXX_CONSTEXPR double
- signaling_NaN() throw() { return __builtin_nans (""); }
+ signaling_NaN() _GLIBCXX_USE_NOEXCEPT { return __builtin_nans(""); }
static _GLIBCXX_CONSTEXPR double
- denorm_min() throw() { return __DBL_DENORM_MIN__; }
+ denorm_min() _GLIBCXX_USE_NOEXCEPT { return __DBL_DENORM_MIN__; }
static _GLIBCXX_USE_CONSTEXPR bool is_iec559
= has_infinity && has_quiet_NaN && has_denorm == denorm_present;
@@ -1551,14 +1556,14 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true;
static _GLIBCXX_CONSTEXPR long double
- min() throw() { return __LDBL_MIN__; }
+ min() _GLIBCXX_USE_NOEXCEPT { return __LDBL_MIN__; }
static _GLIBCXX_CONSTEXPR long double
- max() throw() { return __LDBL_MAX__; }
+ max() _GLIBCXX_USE_NOEXCEPT { return __LDBL_MAX__; }
#ifdef __GXX_EXPERIMENTAL_CXX0X__
static constexpr long double
- lowest() throw() { return -__LDBL_MAX__; }
+ lowest() noexcept { return -__LDBL_MAX__; }
#endif
static _GLIBCXX_USE_CONSTEXPR int digits = __LDBL_MANT_DIG__;
@@ -1573,10 +1578,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
static _GLIBCXX_USE_CONSTEXPR int radix = __FLT_RADIX__;
static _GLIBCXX_CONSTEXPR long double
- epsilon() throw() { return __LDBL_EPSILON__; }
+ epsilon() _GLIBCXX_USE_NOEXCEPT { return __LDBL_EPSILON__; }
static _GLIBCXX_CONSTEXPR long double
- round_error() throw() { return 0.5L; }
+ round_error() _GLIBCXX_USE_NOEXCEPT { return 0.5L; }
static _GLIBCXX_USE_CONSTEXPR int min_exponent = __LDBL_MIN_EXP__;
static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = __LDBL_MIN_10_EXP__;
@@ -1592,16 +1597,16 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
= __glibcxx_long_double_has_denorm_loss;
static _GLIBCXX_CONSTEXPR long double
- infinity() throw() { return __builtin_huge_vall (); }
+ infinity() _GLIBCXX_USE_NOEXCEPT { return __builtin_huge_vall(); }
static _GLIBCXX_CONSTEXPR long double
- quiet_NaN() throw() { return __builtin_nanl (""); }
+ quiet_NaN() _GLIBCXX_USE_NOEXCEPT { return __builtin_nanl(""); }
static _GLIBCXX_CONSTEXPR long double
- signaling_NaN() throw() { return __builtin_nansl (""); }
+ signaling_NaN() _GLIBCXX_USE_NOEXCEPT { return __builtin_nansl(""); }
static _GLIBCXX_CONSTEXPR long double
- denorm_min() throw() { return __LDBL_DENORM_MIN__; }
+ denorm_min() _GLIBCXX_USE_NOEXCEPT { return __LDBL_DENORM_MIN__; }
static _GLIBCXX_USE_CONSTEXPR bool is_iec559
= has_infinity && has_quiet_NaN && has_denorm == denorm_present;
diff --git a/libstdc++-v3/include/std/tuple b/libstdc++-v3/include/std/tuple
index fb452aeb43e..dc9330d0b59 100644
--- a/libstdc++-v3/include/std/tuple
+++ b/libstdc++-v3/include/std/tuple
@@ -59,6 +59,15 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
struct __add_ref<_Tp&>
{ typedef _Tp& type; };
+ // Adds an rvalue reference to a non-reference type.
+ template<typename _Tp>
+ struct __add_r_ref
+ { typedef _Tp&& type; };
+
+ template<typename _Tp>
+ struct __add_r_ref<_Tp&>
+ { typedef _Tp& type; };
+
template<std::size_t _Idx, typename _Head, bool _IsEmpty>
struct _Head_base;
@@ -76,15 +85,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
_Head_base(_UHead&& __h)
: _Head(std::forward<_UHead>(__h)) { }
- _Head& _M_head() { return *this; }
- const _Head& _M_head() const { return *this; }
-
- void
- _M_swap_impl(_Head& __h)
- {
- using std::swap;
- swap(__h, _M_head());
- }
+ _Head& _M_head() noexcept { return *this; }
+ const _Head& _M_head() const noexcept { return *this; }
};
template<std::size_t _Idx, typename _Head>
@@ -100,15 +102,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
_Head_base(_UHead&& __h)
: _M_head_impl(std::forward<_UHead>(__h)) { }
- _Head& _M_head() { return _M_head_impl; }
- const _Head& _M_head() const { return _M_head_impl; }
-
- void
- _M_swap_impl(_Head& __h)
- {
- using std::swap;
- swap(__h, _M_head());
- }
+ _Head& _M_head() noexcept { return _M_head_impl; }
+ const _Head& _M_head() const noexcept { return _M_head_impl; }
_Head _M_head_impl;
};
@@ -130,9 +125,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
*/
template<std::size_t _Idx>
struct _Tuple_impl<_Idx>
- {
+ {
+ template<std::size_t, typename...> friend class _Tuple_impl;
+
protected:
- void _M_swap_impl(_Tuple_impl&) { /* no-op */ }
+ void _M_swap(_Tuple_impl&) noexcept { /* no-op */ }
};
/**
@@ -145,14 +142,16 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
: public _Tuple_impl<_Idx + 1, _Tail...>,
private _Head_base<_Idx, _Head, std::is_empty<_Head>::value>
{
+ template<std::size_t, typename...> friend class _Tuple_impl;
+
typedef _Tuple_impl<_Idx + 1, _Tail...> _Inherited;
typedef _Head_base<_Idx, _Head, std::is_empty<_Head>::value> _Base;
- _Head& _M_head() { return _Base::_M_head(); }
- const _Head& _M_head() const { return _Base::_M_head(); }
+ _Head& _M_head() noexcept { return _Base::_M_head(); }
+ const _Head& _M_head() const noexcept { return _Base::_M_head(); }
- _Inherited& _M_tail() { return *this; }
- const _Inherited& _M_tail() const { return *this; }
+ _Inherited& _M_tail() noexcept { return *this; }
+ const _Inherited& _M_tail() const noexcept { return *this; }
constexpr _Tuple_impl()
: _Inherited(), _Base() { }
@@ -192,6 +191,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
_Tuple_impl&
operator=(_Tuple_impl&& __in)
+ noexcept(is_nothrow_move_assignable<_Head>::value
+ && is_nothrow_move_assignable<_Inherited>::value)
{
_M_head() = std::forward<_Head>(__in._M_head());
_M_tail() = std::move(__in._M_tail());
@@ -218,10 +219,14 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
protected:
void
- _M_swap_impl(_Tuple_impl& __in)
+ _M_swap(_Tuple_impl& __in)
+ noexcept(noexcept(swap(std::declval<_Head&>(),
+ std::declval<_Head&>()))
+ && noexcept(__in._M_tail()._M_swap(__in._M_tail())))
{
- _Base::_M_swap_impl(__in._M_head());
- _Inherited::_M_swap_impl(__in._M_tail());
+ using std::swap;
+ swap(this->_M_head(), __in._M_head());
+ _Inherited::_M_swap(__in._M_tail());
}
};
@@ -273,6 +278,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
tuple&
operator=(tuple&& __in)
+ noexcept(is_nothrow_move_assignable<_Inherited>::value)
{
static_cast<_Inherited&>(*this) = std::move(__in);
return *this;
@@ -300,14 +306,15 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
void
swap(tuple& __in)
- { _Inherited::_M_swap_impl(__in); }
+ noexcept(noexcept(__in._M_swap(__in)))
+ { _Inherited::_M_swap(__in); }
};
template<>
class tuple<>
{
public:
- void swap(tuple&) { /* no-op */ }
+ void swap(tuple&) noexcept { /* no-op */ }
};
/// tuple (2-element), with construction and assignment from a pair.
@@ -360,6 +367,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
tuple&
operator=(tuple&& __in)
+ noexcept(is_nothrow_move_assignable<_Inherited>::value)
{
static_cast<_Inherited&>(*this) = std::move(__in);
return *this;
@@ -401,11 +409,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
void
swap(tuple& __in)
- {
- using std::swap;
- swap(this->_M_head(), __in._M_head());
- swap(this->_M_tail()._M_head(), __in._M_tail()._M_head());
- }
+ noexcept(noexcept(__in._M_swap(__in)))
+ { _Inherited::_M_swap(__in); }
};
/// tuple (1-element).
@@ -450,6 +455,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
tuple&
operator=(tuple&& __in)
+ noexcept(is_nothrow_move_assignable<_Inherited>::value)
{
static_cast<_Inherited&>(*this) = std::move(__in);
return *this;
@@ -473,7 +479,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
void
swap(tuple& __in)
- { _Inherited::_M_swap_impl(__in); }
+ noexcept(noexcept(__in._M_swap(__in)))
+ { _Inherited::_M_swap(__in); }
};
@@ -498,46 +505,89 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
typedef _Head type;
};
+ template<std::size_t __i, typename _Tp>
+ struct tuple_element<__i, const _Tp>
+ {
+ typedef typename
+ add_const<typename tuple_element<__i, _Tp>::type>::type type;
+ };
+
+ template<std::size_t __i, typename _Tp>
+ struct tuple_element<__i, volatile _Tp>
+ {
+ typedef typename
+ add_volatile<typename tuple_element<__i, _Tp>::type>::type type;
+ };
+
+ template<std::size_t __i, typename _Tp>
+ struct tuple_element<__i, const volatile _Tp>
+ {
+ typedef typename
+ add_cv<typename tuple_element<__i, _Tp>::type>::type type;
+ };
+
/// Finds the size of a given tuple type.
template<typename _Tp>
struct tuple_size;
- /// class tuple_size
- template<typename... _Elements>
- struct tuple_size<tuple<_Elements...> >
- {
- static const std::size_t value = sizeof...(_Elements);
- };
+ template<typename _Tp>
+ struct tuple_size<const _Tp>
+ : public integral_constant<
+ typename remove_cv<decltype(tuple_size<_Tp>::value)>::type,
+ tuple_size<_Tp>::value> { };
+ template<typename _Tp>
+ struct tuple_size<volatile _Tp>
+ : public integral_constant<
+ typename remove_cv<decltype(tuple_size<_Tp>::value)>::type,
+ tuple_size<_Tp>::value> { };
+
+ template<typename _Tp>
+ struct tuple_size<const volatile _Tp>
+ : public integral_constant<
+ typename remove_cv<decltype(tuple_size<_Tp>::value)>::type,
+ tuple_size<_Tp>::value> { };
+
+ /// class tuple_size
template<typename... _Elements>
- const std::size_t tuple_size<tuple<_Elements...> >::value;
+ struct tuple_size<tuple<_Elements...>>
+ : public integral_constant<std::size_t, sizeof...(_Elements)> { };
template<std::size_t __i, typename _Head, typename... _Tail>
inline typename __add_ref<_Head>::type
- __get_helper(_Tuple_impl<__i, _Head, _Tail...>& __t)
+ __get_helper(_Tuple_impl<__i, _Head, _Tail...>& __t) noexcept
{ return __t._M_head(); }
template<std::size_t __i, typename _Head, typename... _Tail>
inline typename __add_c_ref<_Head>::type
- __get_helper(const _Tuple_impl<__i, _Head, _Tail...>& __t)
+ __get_helper(const _Tuple_impl<__i, _Head, _Tail...>& __t) noexcept
{ return __t._M_head(); }
- // Return a reference (const reference) to the ith element of a tuple.
- // Any const or non-const ref elements are returned with their original type.
+ // Return a reference (const reference, rvalue reference) to the ith element
+ // of a tuple. Any const or non-const ref elements are returned with their
+ // original type.
template<std::size_t __i, typename... _Elements>
inline typename __add_ref<
- typename tuple_element<__i, tuple<_Elements...> >::type
+ typename tuple_element<__i, tuple<_Elements...>>::type
>::type
- get(tuple<_Elements...>& __t)
+ get(tuple<_Elements...>& __t) noexcept
{ return __get_helper<__i>(__t); }
template<std::size_t __i, typename... _Elements>
inline typename __add_c_ref<
- typename tuple_element<__i, tuple<_Elements...> >::type
+ typename tuple_element<__i, tuple<_Elements...>>::type
>::type
- get(const tuple<_Elements...>& __t)
+ get(const tuple<_Elements...>& __t) noexcept
{ return __get_helper<__i>(__t); }
+ template<std::size_t __i, typename... _Elements>
+ inline typename __add_r_ref<
+ typename tuple_element<__i, tuple<_Elements...>>::type
+ >::type
+ get(tuple<_Elements...>&& __t) noexcept
+ { return std::forward<typename tuple_element<__i,
+ tuple<_Elements...>>::type&&>(get<__i>(__t)); }
+
// This class helps construct the various comparison operations on tuples
template<std::size_t __check_equal_size, std::size_t __i, std::size_t __j,
typename _Tp, typename _Up>
@@ -628,7 +678,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
template<typename... _Elements>
inline tuple<_Elements&&...>
- forward_as_tuple(_Elements&&... __args)
+ forward_as_tuple(_Elements&&... __args) noexcept
{ return tuple<_Elements&&...>(std::forward<_Elements>(__args)...); }
template<std::size_t...> struct __index_holder { };
@@ -737,12 +787,13 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
template<typename... _Elements>
inline tuple<_Elements&...>
- tie(_Elements&... __args)
+ tie(_Elements&... __args) noexcept
{ return tuple<_Elements&...>(__args...); }
template<typename... _Elements>
inline void
swap(tuple<_Elements...>& __x, tuple<_Elements...>& __y)
+ noexcept(noexcept(__x.swap(__y)))
{ __x.swap(__y); }
// A class (and instance) which can be used in 'tie' when an element
diff --git a/libstdc++-v3/include/std/type_traits b/libstdc++-v3/include/std/type_traits
index 0560522cbfd..184e28ba8dc 100644
--- a/libstdc++-v3/include/std/type_traits
+++ b/libstdc++-v3/include/std/type_traits
@@ -988,10 +988,110 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
: public __is_nothrow_move_constructible_impl<_Tp>
{ };
- /// has_nothrow_copy_assign
+ template<typename _Tp, typename _Up>
+ class __is_assignable_helper
+ : public __sfinae_types
+ {
+ template<typename _Tp1, typename _Up1>
+ static decltype(declval<_Tp1>() = declval<_Up1>(), __one())
+ __test(int);
+
+ template<typename, typename>
+ static __two __test(...);
+
+ public:
+ static constexpr bool value = sizeof(__test<_Tp, _Up>(0)) == 1;
+ };
+
+ /// is_assignable
+ template<typename _Tp, typename _Up>
+ struct is_assignable
+ : public integral_constant<bool,
+ __is_assignable_helper<_Tp, _Up>::value>
+ { };
+
+ template<typename _Tp, bool = is_void<_Tp>::value>
+ struct __is_copy_assignable_impl;
+
+ template<typename _Tp>
+ struct __is_copy_assignable_impl<_Tp, true>
+ : public false_type { };
+
+ template<typename _Tp>
+ struct __is_copy_assignable_impl<_Tp, false>
+ : public is_assignable<_Tp&, const _Tp&&>
+ { };
+
+ /// is_copy_assignable
+ template<typename _Tp>
+ struct is_copy_assignable
+ : public __is_copy_assignable_impl<_Tp>
+ { };
+
+ template<typename _Tp, bool = is_void<_Tp>::value>
+ struct __is_move_assignable_impl;
+
+ template<typename _Tp>
+ struct __is_move_assignable_impl<_Tp, true>
+ : public false_type { };
+
+ template<typename _Tp>
+ struct __is_move_assignable_impl<_Tp, false>
+ : public is_assignable<_Tp&, _Tp&&>
+ { };
+
+ /// is_move_assignable
+ template<typename _Tp>
+ struct is_move_assignable
+ : public __is_move_assignable_impl<_Tp>
+ { };
+
+ template<typename _Tp, typename _Up>
+ struct __is_nt_assignable_impl
+ : public integral_constant<bool, noexcept(declval<_Tp>() = declval<_Up>())>
+ { };
+
+ /// is_nothrow_assignable
+ template<typename _Tp, typename _Up>
+ struct is_nothrow_assignable
+ : public __and_<is_assignable<_Tp, _Up>,
+ __is_nt_assignable_impl<_Tp, _Up>>::type
+ { };
+
+ template<typename _Tp, bool = is_void<_Tp>::value>
+ struct __is_nt_copy_assignable_impl;
+
+ template<typename _Tp>
+ struct __is_nt_copy_assignable_impl<_Tp, true>
+ : public false_type { };
+
+ template<typename _Tp>
+ struct __is_nt_copy_assignable_impl<_Tp, false>
+ : public is_nothrow_assignable<_Tp&, const _Tp&&>
+ { };
+
+ /// is_nothrow_copy_assignable
+ template<typename _Tp>
+ struct is_nothrow_copy_assignable
+ : public __is_nt_copy_assignable_impl<_Tp>
+ { };
+
+ template<typename _Tp, bool = is_void<_Tp>::value>
+ struct __is_nt_move_assignable_impl;
+
+ template<typename _Tp>
+ struct __is_nt_move_assignable_impl<_Tp, true>
+ : public false_type { };
+
+ template<typename _Tp>
+ struct __is_nt_move_assignable_impl<_Tp, false>
+ : public is_nothrow_assignable<_Tp&, _Tp&&>
+ { };
+
+ /// is_nothrow_move_assignable
template<typename _Tp>
- struct has_nothrow_copy_assign
- : public integral_constant<bool, __has_nothrow_assign(_Tp)>
+ struct is_nothrow_move_assignable
+ : public __is_nt_move_assignable_impl<_Tp>
{ };
/// has_trivial_default_constructor
@@ -1086,7 +1186,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
bool = __or_<is_void<_From>, is_function<_To>,
is_array<_To>>::value>
struct __is_convertible_helper
- { static const bool __value = is_void<_To>::value; };
+ { static constexpr bool value = is_void<_To>::value; };
template<typename _From, typename _To>
class __is_convertible_helper<_From, _To, false>
@@ -1103,14 +1203,14 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
static __two __test(...);
public:
- static const bool __value = sizeof(__test<_From, _To>(0)) == 1;
+ static constexpr bool value = sizeof(__test<_From, _To>(0)) == 1;
};
/// is_convertible
template<typename _From, typename _To>
struct is_convertible
: public integral_constant<bool,
- __is_convertible_helper<_From, _To>::__value>
+ __is_convertible_helper<_From, _To>::value>
{ };
/// is_explicitly_convertible
@@ -1729,7 +1829,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
static __two __test(...); \
\
public: \
- static const bool value = sizeof(__test<_Tp>(0)) == 1; \
+ static constexpr bool value = sizeof(__test<_Tp>(0)) == 1; \
}; \
\
template<typename _Tp> \
diff --git a/libstdc++-v3/include/std/utility b/libstdc++-v3/include/std/utility
index 245c41fa75d..f433e46acee 100644
--- a/libstdc++-v3/include/std/utility
+++ b/libstdc++-v3/include/std/utility
@@ -1,6 +1,7 @@
// <utility> -*- C++ -*-
-// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
+// Copyright (C) 2001, 2002, 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
@@ -86,19 +87,15 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
// Various functions which give std::pair a tuple-like interface.
template<class _Tp1, class _Tp2>
- struct tuple_size<std::pair<_Tp1, _Tp2> >
- { static const std::size_t value = 2; };
+ struct tuple_size<std::pair<_Tp1, _Tp2>>
+ : public integral_constant<std::size_t, 2> { };
template<class _Tp1, class _Tp2>
- const std::size_t
- tuple_size<std::pair<_Tp1, _Tp2> >::value;
-
- template<class _Tp1, class _Tp2>
- struct tuple_element<0, std::pair<_Tp1, _Tp2> >
+ struct tuple_element<0, std::pair<_Tp1, _Tp2>>
{ typedef _Tp1 type; };
template<class _Tp1, class _Tp2>
- struct tuple_element<1, std::pair<_Tp1, _Tp2> >
+ struct tuple_element<1, std::pair<_Tp1, _Tp2>>
{ typedef _Tp2 type; };
template<std::size_t _Int>
@@ -108,34 +105,53 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
struct __pair_get<0>
{
template<typename _Tp1, typename _Tp2>
- static _Tp1& __get(std::pair<_Tp1, _Tp2>& __pair)
- { return __pair.first; }
+ static _Tp1&
+ __get(std::pair<_Tp1, _Tp2>& __pair) noexcept
+ { return __pair.first; }
+
+ template<typename _Tp1, typename _Tp2>
+ static _Tp1&&
+ __move_get(std::pair<_Tp1, _Tp2>&& __pair) noexcept
+ { return std::forward<_Tp1>(__pair.first); }
template<typename _Tp1, typename _Tp2>
- static const _Tp1& __const_get(const std::pair<_Tp1, _Tp2>& __pair)
- { return __pair.first; }
+ static const _Tp1&
+ __const_get(const std::pair<_Tp1, _Tp2>& __pair) noexcept
+ { return __pair.first; }
};
template<>
struct __pair_get<1>
{
template<typename _Tp1, typename _Tp2>
- static _Tp2& __get(std::pair<_Tp1, _Tp2>& __pair)
- { return __pair.second; }
+ static _Tp2&
+ __get(std::pair<_Tp1, _Tp2>& __pair) noexcept
+ { return __pair.second; }
template<typename _Tp1, typename _Tp2>
- static const _Tp2& __const_get(const std::pair<_Tp1, _Tp2>& __pair)
- { return __pair.second; }
+ static _Tp2&&
+ __move_get(std::pair<_Tp1, _Tp2>&& __pair) noexcept
+ { return std::forward<_Tp2>(__pair.second); }
+
+ template<typename _Tp1, typename _Tp2>
+ static const _Tp2&
+ __const_get(const std::pair<_Tp1, _Tp2>& __pair) noexcept
+ { return __pair.second; }
};
template<std::size_t _Int, class _Tp1, class _Tp2>
- inline typename tuple_element<_Int, std::pair<_Tp1, _Tp2> >::type&
- get(std::pair<_Tp1, _Tp2>& __in)
+ inline typename tuple_element<_Int, std::pair<_Tp1, _Tp2>>::type&
+ get(std::pair<_Tp1, _Tp2>& __in) noexcept
{ return __pair_get<_Int>::__get(__in); }
template<std::size_t _Int, class _Tp1, class _Tp2>
- inline const typename tuple_element<_Int, std::pair<_Tp1, _Tp2> >::type&
- get(const std::pair<_Tp1, _Tp2>& __in)
+ inline typename tuple_element<_Int, std::pair<_Tp1, _Tp2>>::type&&
+ get(std::pair<_Tp1, _Tp2>&& __in) noexcept
+ { return __pair_get<_Int>::__move_get(std::move(__in)); }
+
+ template<std::size_t _Int, class _Tp1, class _Tp2>
+ inline const typename tuple_element<_Int, std::pair<_Tp1, _Tp2>>::type&
+ get(const std::pair<_Tp1, _Tp2>& __in) noexcept
{ return __pair_get<_Int>::__const_get(__in); }
_GLIBCXX_END_NAMESPACE_VERSION
diff --git a/libstdc++-v3/libsupc++/initializer_list b/libstdc++-v3/libsupc++/initializer_list
index 1048d44de07..3a980a54a3c 100644
--- a/libstdc++-v3/libsupc++/initializer_list
+++ b/libstdc++-v3/libsupc++/initializer_list
@@ -1,6 +1,6 @@
// std::initializer_list support -*- C++ -*-
-// Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
+// Copyright (C) 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
//
// This file is part of GCC.
//
@@ -61,19 +61,20 @@ namespace std
: _M_array(__a), _M_len(__l) { }
public:
- constexpr initializer_list() : _M_array(0), _M_len(0) { }
+ constexpr initializer_list() noexcept
+ : _M_array(0), _M_len(0) { }
// Number of elements.
constexpr size_type
- size() { return _M_len; }
+ size() const noexcept { return _M_len; }
// First element.
constexpr const_iterator
- begin() { return _M_array; }
+ begin() const noexcept { return _M_array; }
// One past the last element.
constexpr const_iterator
- end() { return begin() + size(); }
+ end() const noexcept { return begin() + size(); }
};
/**
@@ -83,7 +84,7 @@ namespace std
*/
template<class _Tp>
constexpr const _Tp*
- begin(initializer_list<_Tp> __ils)
+ begin(initializer_list<_Tp> __ils) noexcept
{ return __ils.begin(); }
/**
@@ -93,7 +94,7 @@ namespace std
*/
template<class _Tp>
constexpr const _Tp*
- end(initializer_list<_Tp> __ils)
+ end(initializer_list<_Tp> __ils) noexcept
{ return __ils.end(); }
}
diff --git a/libstdc++-v3/testsuite/20_util/declval/requirements/1_neg.cc b/libstdc++-v3/testsuite/20_util/declval/requirements/1_neg.cc
index 4fa005ecdd6..3ca56e9c333 100644
--- a/libstdc++-v3/testsuite/20_util/declval/requirements/1_neg.cc
+++ b/libstdc++-v3/testsuite/20_util/declval/requirements/1_neg.cc
@@ -19,7 +19,7 @@
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
-// { dg-error "static assertion failed" "" { target *-*-* } 1615 }
+// { dg-error "static assertion failed" "" { target *-*-* } 1715 }
#include <utility>
diff --git a/libstdc++-v3/testsuite/20_util/has_nothrow_copy_assign/value.cc b/libstdc++-v3/testsuite/20_util/has_nothrow_copy_assign/value.cc
deleted file mode 100644
index 0201c9cb91d..00000000000
--- a/libstdc++-v3/testsuite/20_util/has_nothrow_copy_assign/value.cc
+++ /dev/null
@@ -1,57 +0,0 @@
-// { dg-options "-std=gnu++0x" }
-// 2010-06-08 Paolo Carlini <paolo.carlini@oracle.com>
-//
-// Copyright (C) 2010 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 <type_traits>
-#include <testsuite_hooks.h>
-#include <testsuite_tr1.h>
-
-void test01()
-{
- bool test __attribute__((unused)) = true;
- using std::has_nothrow_copy_assign;
- using namespace __gnu_test;
-
- VERIFY( (test_property<has_nothrow_copy_assign, int>(true)) );
- VERIFY( (test_property<has_nothrow_copy_assign, float>(true)) );
- VERIFY( (test_property<has_nothrow_copy_assign, EnumType>(true)) );
- VERIFY( (test_property<has_nothrow_copy_assign, int*>(true)) );
- VERIFY( (test_property<has_nothrow_copy_assign, int(*)(int)>(true)) );
- VERIFY( (test_property<has_nothrow_copy_assign, int (ClassType::*)>(true)) );
- VERIFY( (test_property<has_nothrow_copy_assign,
- int (ClassType::*) (int)>(true)) );
- VERIFY( (test_property<has_nothrow_copy_assign, int[2]>(true)) );
- VERIFY( (test_property<has_nothrow_copy_assign, float[][3]>(true)) );
- VERIFY( (test_property<has_nothrow_copy_assign, EnumType[2][3][4]>(true)) );
- VERIFY( (test_property<has_nothrow_copy_assign, int*[3]>(true)) );
- VERIFY( (test_property<has_nothrow_copy_assign, int(*[][2])(int)>(true)) );
- VERIFY( (test_property<has_nothrow_copy_assign,
- int (ClassType::*[2][3])>(true)) );
- VERIFY( (test_property<has_nothrow_copy_assign,
- int (ClassType::*[][2][3]) (int)>(true)) );
-
- // Negative tests.
- VERIFY( (test_property<has_nothrow_copy_assign, void>(false)) );
-}
-
-int main()
-{
- test01();
- return 0;
-}
diff --git a/libstdc++-v3/testsuite/20_util/is_assignable/requirements/explicit_instantiation.cc b/libstdc++-v3/testsuite/20_util/is_assignable/requirements/explicit_instantiation.cc
new file mode 100644
index 00000000000..f4c0e2a6430
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/is_assignable/requirements/explicit_instantiation.cc
@@ -0,0 +1,31 @@
+// { dg-options "-std=gnu++0x" }
+// { dg-do compile }
+
+// 2011-05-19 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/>.
+
+// NB: This file is for testing type_traits with NO OTHER INCLUDES.
+
+#include <type_traits>
+
+namespace std
+{
+ typedef short test_type;
+ template struct is_assignable<test_type, test_type>;
+}
diff --git a/libstdc++-v3/testsuite/20_util/has_nothrow_copy_assign/requirements/typedefs.cc b/libstdc++-v3/testsuite/20_util/is_assignable/requirements/typedefs.cc
index 3781d1f9bec..d73c0c9a5ff 100644
--- a/libstdc++-v3/testsuite/20_util/has_nothrow_copy_assign/requirements/typedefs.cc
+++ b/libstdc++-v3/testsuite/20_util/is_assignable/requirements/typedefs.cc
@@ -1,7 +1,9 @@
// { dg-options "-std=gnu++0x" }
-// 2010-06-08 Paolo Carlini <paolo.carlini@oracle.com>
+// { dg-do compile }
+
+// 2011-05-19 Paolo Carlini <paolo.carlini@oracle.com>
//
-// Copyright (C) 2010 Free Software Foundation, Inc.
+// 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
@@ -23,12 +25,10 @@
#include <type_traits>
-// { dg-do compile }
-
void test01()
{
// Check for required typedefs
- typedef std::has_nothrow_copy_assign<int> test_type;
+ typedef std::is_assignable<int, int> test_type;
typedef test_type::value_type value_type;
typedef test_type::type type;
typedef test_type::type::value_type type_value_type;
diff --git a/libstdc++-v3/testsuite/20_util/is_assignable/value.cc b/libstdc++-v3/testsuite/20_util/is_assignable/value.cc
new file mode 100644
index 00000000000..547f732bcc5
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/is_assignable/value.cc
@@ -0,0 +1,675 @@
+// { dg-options "-std=gnu++0x" }
+// { dg-do compile }
+
+// 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 <type_traits>
+#include <initializer_list>
+#include <testsuite_tr1.h>
+
+using namespace __gnu_test::assign;
+
+static_assert(std::is_assignable<int&, int>::value, "Error");
+static_assert(std::is_assignable<int&, const int>::value, "Error");
+static_assert(std::is_assignable<int&, int&>::value, "Error");
+static_assert(std::is_assignable<int&, const int&>::value, "Error");
+
+static_assert(!std::is_assignable<int, int>::value, "Error");
+static_assert(!std::is_assignable<int, const int>::value, "Error");
+static_assert(!std::is_assignable<int, int&>::value, "Error");
+static_assert(!std::is_assignable<int, const int&>::value, "Error");
+
+static_assert(!std::is_assignable<const int, int>::value, "Error");
+static_assert(!std::is_assignable<const int, const int>::value, "Error");
+static_assert(!std::is_assignable<const int, int&>::value, "Error");
+static_assert(!std::is_assignable<const int, const int&>::value, "Error");
+
+static_assert(!std::is_assignable<const int&, int>::value, "Error");
+static_assert(!std::is_assignable<const int&, const int>::value, "Error");
+static_assert(!std::is_assignable<const int&, int&>::value, "Error");
+static_assert(!std::is_assignable<const int&, const int&>::value, "Error");
+
+static_assert(std::is_assignable<Empty&, Empty>::value, "Error");
+static_assert(std::is_assignable<Empty&, const Empty>::value, "Error");
+static_assert(std::is_assignable<Empty&, Empty&>::value, "Error");
+static_assert(std::is_assignable<Empty&, const Empty&>::value, "Error");
+static_assert(std::is_assignable<Empty, Empty>::value, "Error");
+static_assert(std::is_assignable<Empty, const Empty>::value, "Error");
+static_assert(std::is_assignable<Empty, Empty&>::value, "Error");
+static_assert(std::is_assignable<Empty, const Empty&>::value, "Error");
+
+static_assert(std::is_assignable<B&, B>::value, "Error");
+static_assert(std::is_assignable<B&, const B>::value, "Error");
+static_assert(std::is_assignable<B&, B&>::value, "Error");
+static_assert(std::is_assignable<B&, const B&>::value, "Error");
+static_assert(std::is_assignable<B, B>::value, "Error");
+static_assert(std::is_assignable<B, const B>::value, "Error");
+static_assert(std::is_assignable<B, B&>::value, "Error");
+static_assert(std::is_assignable<B, const B&>::value, "Error");
+
+static_assert(std::is_assignable<bool&, bool>::value, "Error");
+static_assert(std::is_assignable<bool&, const bool>::value, "Error");
+static_assert(std::is_assignable<bool&, bool&>::value, "Error");
+static_assert(std::is_assignable<bool&, const bool&>::value, "Error");
+
+// bool is a fundamental type that does not allow assignment to an rvalue:
+static_assert(!std::is_assignable<bool, bool>::value, "Error");
+static_assert(!std::is_assignable<bool, const bool>::value, "Error");
+static_assert(!std::is_assignable<bool, bool&>::value, "Error");
+static_assert(!std::is_assignable<bool, const bool&>::value, "Error");
+
+static_assert(std::is_assignable<std::nullptr_t&,
+std::nullptr_t>::value, "Error");
+static_assert(std::is_assignable<std::nullptr_t&, const
+std::nullptr_t>::value, "Error");
+static_assert(std::is_assignable<std::nullptr_t&,
+std::nullptr_t&>::value, "Error");
+static_assert(std::is_assignable<std::nullptr_t&, const
+std::nullptr_t&>::value, "Error");
+
+// std::nullptr_t is a fundamental type that does not allow
+// assignment to an rvalue:
+static_assert(!std::is_assignable<std::nullptr_t,
+std::nullptr_t>::value, "Error");
+static_assert(!std::is_assignable<std::nullptr_t, const
+std::nullptr_t>::value, "Error");
+static_assert(!std::is_assignable<std::nullptr_t,
+std::nullptr_t&>::value, "Error");
+static_assert(!std::is_assignable<std::nullptr_t, const
+std::nullptr_t&>::value, "Error");
+
+static_assert(std::is_assignable<E&, E>::value, "Error");
+static_assert(std::is_assignable<E&, const E>::value, "Error");
+static_assert(std::is_assignable<E&, E&>::value, "Error");
+static_assert(std::is_assignable<E&, const E&>::value, "Error");
+
+static_assert(std::is_assignable<int&, E>::value, "Error");
+static_assert(std::is_assignable<int&, const E>::value, "Error");
+static_assert(std::is_assignable<int&, E&>::value, "Error");
+static_assert(std::is_assignable<int&, const E&>::value, "Error");
+
+static_assert(!std::is_assignable<E&, int>::value, "Error");
+static_assert(!std::is_assignable<E&, const int>::value, "Error");
+static_assert(!std::is_assignable<E&, int&>::value, "Error");
+static_assert(!std::is_assignable<E&, const int&>::value, "Error");
+
+static_assert(!std::is_assignable<E&, E2>::value, "Error");
+static_assert(!std::is_assignable<E&, const E2>::value, "Error");
+static_assert(!std::is_assignable<E&, E2&>::value, "Error");
+static_assert(!std::is_assignable<E&, const E2&>::value, "Error");
+
+// E is not a class type and thus does not allow assignment to an rvalue:
+static_assert(!std::is_assignable<E, E>::value, "Error");
+static_assert(!std::is_assignable<E, const E>::value, "Error");
+static_assert(!std::is_assignable<E, E&>::value, "Error");
+static_assert(!std::is_assignable<E, const E&>::value, "Error");
+
+static_assert(std::is_assignable<SE&, SE>::value, "Error");
+static_assert(std::is_assignable<SE&, const SE>::value, "Error");
+static_assert(std::is_assignable<SE&, SE&>::value, "Error");
+static_assert(std::is_assignable<SE&, const SE&>::value, "Error");
+
+static_assert(!std::is_assignable<int&, SE>::value, "Error");
+static_assert(!std::is_assignable<int&, const SE>::value, "Error");
+static_assert(!std::is_assignable<int&, SE&>::value, "Error");
+static_assert(!std::is_assignable<int&, const SE&>::value, "Error");
+
+static_assert(!std::is_assignable<SE&, int>::value, "Error");
+static_assert(!std::is_assignable<SE&, const int>::value, "Error");
+static_assert(!std::is_assignable<SE&, int&>::value, "Error");
+static_assert(!std::is_assignable<SE&, const int&>::value, "Error");
+
+// SE is not a class type and thus does not allow assignment to an rvalue:
+static_assert(!std::is_assignable<SE, SE>::value, "Error");
+static_assert(!std::is_assignable<SE, const SE>::value, "Error");
+static_assert(!std::is_assignable<SE, SE&>::value, "Error");
+static_assert(!std::is_assignable<SE, const SE&>::value, "Error");
+
+static_assert(std::is_assignable<AnyAssign&, int>::value, "Error");
+static_assert(std::is_assignable<AnyAssign&, std::nullptr_t>::value, "Error");
+static_assert(std::is_assignable<AnyAssign&, E>::value, "Error");
+static_assert(std::is_assignable<AnyAssign&, SE>::value, "Error");
+static_assert(std::is_assignable<AnyAssign&, Empty>::value, "Error");
+static_assert(std::is_assignable<AnyAssign&, U>::value, "Error");
+static_assert(std::is_assignable<AnyAssign&, int&>::value, "Error");
+static_assert(std::is_assignable<AnyAssign&, std::nullptr_t&>::value, "Error");
+static_assert(std::is_assignable<AnyAssign&, E&>::value, "Error");
+static_assert(std::is_assignable<AnyAssign&, SE&>::value, "Error");
+static_assert(std::is_assignable<AnyAssign&, Empty&>::value, "Error");
+static_assert(std::is_assignable<AnyAssign&, U&>::value, "Error");
+static_assert(std::is_assignable<AnyAssign&, AnyAssign>::value, "Error");
+static_assert(std::is_assignable<AnyAssign&,
+std::initializer_list<int>>::value, "Error");
+
+static_assert(std::is_assignable<AnyAssign&, int[1]>::value, "Error");
+static_assert(std::is_assignable<AnyAssign&,
+std::nullptr_t[1]>::value, "Error");
+static_assert(std::is_assignable<AnyAssign&, E[1]>::value, "Error");
+static_assert(std::is_assignable<AnyAssign&, SE[1]>::value, "Error");
+static_assert(std::is_assignable<AnyAssign&, int(&)[1]>::value, "Error");
+static_assert(std::is_assignable<AnyAssign&,
+std::nullptr_t(&)[1]>::value, "Error");
+static_assert(std::is_assignable<AnyAssign&, E(&)[1]>::value, "Error");
+static_assert(std::is_assignable<AnyAssign&, SE(&)[1]>::value, "Error");
+
+static_assert(std::is_assignable<int&, E>::value, "Error");
+static_assert(!std::is_assignable<int&, SE>::value, "Error");
+static_assert(std::is_assignable<bool&, E>::value, "Error");
+static_assert(!std::is_assignable<bool&, SE>::value, "Error");
+static_assert(std::is_assignable<bool&, void*>::value, "Error");
+static_assert(std::is_assignable<bool&, int B::*>::value, "Error");
+static_assert(std::is_assignable<bool&, void*>::value, "Error");
+static_assert(std::is_assignable<bool&, std::nullptr_t>::value, "Error");
+
+static_assert(std::is_assignable<std::nullptr_t&,
+std::nullptr_t>::value, "Error");
+static_assert(std::is_assignable<void*&, std::nullptr_t>::value, "Error");
+static_assert(std::is_assignable<int*&, std::nullptr_t>::value, "Error");
+static_assert(std::is_assignable<int B::*&, std::nullptr_t>::value, "Error");
+static_assert(!std::is_assignable<std::nullptr_t&, bool>::value, "Error");
+static_assert(!std::is_assignable<void*&, bool>::value, "Error");
+static_assert(!std::is_assignable<E&, bool>::value, "Error");
+static_assert(!std::is_assignable<SE&, bool>::value, "Error");
+
+static_assert(std::is_assignable<std::initializer_list<int>&,
+std::initializer_list<int>>::value, "Error");
+static_assert(std::is_assignable<std::initializer_list<int>&,
+std::initializer_list<int>&&>::value, "Error");
+static_assert(std::is_assignable<std::initializer_list<int>&, const
+std::initializer_list<int>&&>::value, "Error");
+static_assert(std::is_assignable<std::initializer_list<int>&,
+std::initializer_list<int>&>::value, "Error");
+static_assert(std::is_assignable<std::initializer_list<int>&, const
+std::initializer_list<int>&>::value, "Error");
+static_assert(!std::is_assignable<const std::initializer_list<int>&,
+std::initializer_list<int>>::value, "Error");
+
+static_assert(!std::is_assignable<const AnyAssign&, int>::value, "Error");
+static_assert(!std::is_assignable<AnyAssign&, void>::value, "Error");
+
+static_assert(!std::is_assignable<void, int>::value, "Error");
+static_assert(!std::is_assignable<const void, int>::value, "Error");
+static_assert(!std::is_assignable<int, void>::value, "Error");
+static_assert(!std::is_assignable<int, const void>::value, "Error");
+static_assert(!std::is_assignable<const int, void>::value, "Error");
+static_assert(!std::is_assignable<const int, const void>::value, "Error");
+static_assert(!std::is_assignable<int&, void>::value, "Error");
+static_assert(!std::is_assignable<int&, const void>::value, "Error");
+static_assert(!std::is_assignable<const int&, void>::value, "Error");
+static_assert(!std::is_assignable<const int&, const void>::value, "Error");
+static_assert(!std::is_assignable<void, void>::value, "Error");
+static_assert(!std::is_assignable<const void, void>::value, "Error");
+static_assert(!std::is_assignable<const void, const void>::value, "Error");
+
+static_assert(!std::is_assignable<int[1], int[1]>::value, "Error");
+static_assert(!std::is_assignable<int(&)[1], int[1]>::value, "Error");
+static_assert(!std::is_assignable<int(&)[1], int(&)[1]>::value, "Error");
+static_assert(!std::is_assignable<int[2], int[1]>::value, "Error");
+static_assert(!std::is_assignable<int(&)[2], int[1]>::value, "Error");
+static_assert(!std::is_assignable<int(&)[2], int(&)[1]>::value, "Error");
+static_assert(!std::is_assignable<int[1], void>::value, "Error");
+static_assert(!std::is_assignable<int(&)[1], void>::value, "Error");
+static_assert(!std::is_assignable<void, int[1]>::value, "Error");
+static_assert(!std::is_assignable<void, int(&)[1]>::value, "Error");
+
+static_assert(!std::is_assignable<int[], int[]>::value, "Error");
+static_assert(!std::is_assignable<int(&)[], int[]>::value, "Error");
+static_assert(!std::is_assignable<int(&)[], int(&)[]>::value, "Error");
+static_assert(!std::is_assignable<int[1], int[]>::value, "Error");
+static_assert(!std::is_assignable<int(&)[1], int[]>::value, "Error");
+static_assert(!std::is_assignable<int(&)[1], int(&)[]>::value, "Error");
+static_assert(!std::is_assignable<int[], int[1]>::value, "Error");
+static_assert(!std::is_assignable<int(&)[], int[1]>::value, "Error");
+static_assert(!std::is_assignable<int(&)[], int(&)[1]>::value, "Error");
+static_assert(!std::is_assignable<int[], void>::value, "Error");
+static_assert(!std::is_assignable<int(&)[], void>::value, "Error");
+static_assert(!std::is_assignable<void, int[]>::value, "Error");
+static_assert(!std::is_assignable<void, int(&)[]>::value, "Error");
+
+static_assert(std::is_assignable<DelCopyAssign&,
+DelCopyAssign>::value, "Error");
+static_assert(!std::is_assignable<DelCopyAssign&, const
+DelCopyAssign>::value, "Error");
+static_assert(!std::is_assignable<DelCopyAssign&,
+DelCopyAssign&>::value, "Error");
+static_assert(!std::is_assignable<DelCopyAssign&, const
+DelCopyAssign&>::value, "Error");
+static_assert(!std::is_assignable<DelCopyAssign&, void>::value, "Error");
+static_assert(!std::is_assignable<DelCopyAssign&, void()>::value, "Error");
+static_assert(!std::is_assignable<DelCopyAssign&, void(&)()>::value, "Error");
+static_assert(!std::is_assignable<DelCopyAssign&, int>::value, "Error");
+
+static_assert(std::is_assignable<DelAnyAssign&,
+DelAnyAssign&&>::value, "Error");
+static_assert(std::is_assignable<DelAnyAssign&, const
+DelAnyAssign&>::value, "Error");
+static_assert(std::is_assignable<DelAnyAssign,
+DelAnyAssign&&>::value, "Error");
+static_assert(std::is_assignable<DelAnyAssign, const
+DelAnyAssign&>::value, "Error");
+
+static_assert(!std::is_assignable<const DelAnyAssign&,
+DelAnyAssign&&>::value, "Error");
+static_assert(!std::is_assignable<const DelAnyAssign&, const
+DelAnyAssign&>::value, "Error");
+static_assert(!std::is_assignable<const DelAnyAssign,
+DelAnyAssign&&>::value, "Error");
+static_assert(!std::is_assignable<const DelAnyAssign, const
+DelAnyAssign&>::value, "Error");
+
+static_assert(!std::is_assignable<DelAnyAssign&, int>::value, "Error");
+static_assert(!std::is_assignable<DelAnyAssign&, int&>::value, "Error");
+static_assert(!std::is_assignable<DelAnyAssign&, const int&>::value, "Error");
+static_assert(!std::is_assignable<DelAnyAssign&, void>::value, "Error");
+static_assert(!std::is_assignable<DelAnyAssign&, void()>::value, "Error");
+static_assert(!std::is_assignable<DelAnyAssign&, void()
+const>::value, "Error");
+static_assert(!std::is_assignable<DelAnyAssign&, void(&)()>::value, "Error");
+static_assert(!std::is_assignable<DelAnyAssign&, void(&&)()>::value, "Error");
+static_assert(!std::is_assignable<DelAnyAssign&,
+std::nullptr_t>::value, "Error");
+static_assert(!std::is_assignable<DelAnyAssign&,
+std::nullptr_t&>::value, "Error");
+static_assert(!std::is_assignable<DelAnyAssign&,
+std::initializer_list<int>>::value, "Error");
+static_assert(!std::is_assignable<DelAnyAssign&,
+std::initializer_list<int>&>::value, "Error");
+static_assert(!std::is_assignable<DelAnyAssign&, bool>::value, "Error");
+static_assert(!std::is_assignable<DelAnyAssign&, bool&>::value, "Error");
+static_assert(!std::is_assignable<DelAnyAssign&, E>::value, "Error");
+static_assert(!std::is_assignable<DelAnyAssign&, E&>::value, "Error");
+static_assert(!std::is_assignable<DelAnyAssign&, SE>::value, "Error");
+static_assert(!std::is_assignable<DelAnyAssign&, SE&>::value, "Error");
+static_assert(!std::is_assignable<DelAnyAssign&, Empty>::value, "Error");
+static_assert(!std::is_assignable<DelAnyAssign&, Empty&>::value, "Error");
+static_assert(!std::is_assignable<DelAnyAssign&, B>::value, "Error");
+static_assert(!std::is_assignable<DelAnyAssign&, B&>::value, "Error");
+static_assert(!std::is_assignable<DelAnyAssign&, U>::value, "Error");
+static_assert(!std::is_assignable<DelAnyAssign&, U&>::value, "Error");
+static_assert(!std::is_assignable<DelAnyAssign&, void*>::value, "Error");
+static_assert(!std::is_assignable<DelAnyAssign&, int*>::value, "Error");
+static_assert(!std::is_assignable<DelAnyAssign&, B*>::value, "Error");
+static_assert(!std::is_assignable<DelAnyAssign&, D*>::value, "Error");
+static_assert(!std::is_assignable<DelAnyAssign&, int B::*>::value, "Error");
+static_assert(!std::is_assignable<DelAnyAssign&, int D::*>::value, "Error");
+static_assert(!std::is_assignable<DelAnyAssign&, int[]>::value, "Error");
+static_assert(!std::is_assignable<DelAnyAssign&, int[1]>::value, "Error");
+static_assert(!std::is_assignable<DelAnyAssign&, int(&)[]>::value, "Error");
+static_assert(!std::is_assignable<DelAnyAssign&, int(&)[1]>::value, "Error");
+
+static_assert(!std::is_assignable<void(), void>::value, "Error");
+static_assert(!std::is_assignable<void, void()>::value, "Error");
+static_assert(!std::is_assignable<void(), void()>::value, "Error");
+
+static_assert(!std::is_assignable<void(&)(), void>::value, "Error");
+static_assert(!std::is_assignable<void, void(&)()>::value, "Error");
+static_assert(!std::is_assignable<void(&)(), void(&)()>::value, "Error");
+static_assert(!std::is_assignable<void(&)(), void()>::value, "Error");
+static_assert(!std::is_assignable<void(), void(&)()>::value, "Error");
+
+static_assert(std::is_assignable<int&, ImplicitTo<int>>::value, "Error");
+static_assert(!std::is_assignable<int&, ExplicitTo<int>>::value, "Error");
+static_assert(!std::is_assignable<int, ImplicitTo<int>>::value, "Error");
+static_assert(!std::is_assignable<int, ExplicitTo<int>>::value, "Error");
+static_assert(!std::is_assignable<const int, ImplicitTo<int>>::value, "Error");
+static_assert(!std::is_assignable<const int, ExplicitTo<int>>::value, "Error");
+static_assert(!std::is_assignable<const int&,
+ImplicitTo<int>>::value, "Error");
+static_assert(!std::is_assignable<const int&,
+ExplicitTo<int>>::value, "Error");
+
+static_assert(std::is_assignable<DelImplicitTo<int>&,
+DelImplicitTo<int>>::value, "Error");
+static_assert(std::is_assignable<DelImplicitTo<int>,
+DelImplicitTo<int>>::value, "Error");
+static_assert(!std::is_assignable<int&, DelImplicitTo<int>>::value, "Error");
+static_assert(!std::is_assignable<int, DelImplicitTo<int>>::value, "Error");
+static_assert(!std::is_assignable<const int&,
+DelImplicitTo<int>>::value, "Error");
+static_assert(!std::is_assignable<const int,
+DelImplicitTo<int>>::value, "Error");
+static_assert(!std::is_assignable<int&, DelExplicitTo<int>>::value, "Error");
+static_assert(!std::is_assignable<int, DelExplicitTo<int>>::value, "Error");
+static_assert(!std::is_assignable<const int&,
+DelExplicitTo<int>>::value, "Error");
+static_assert(!std::is_assignable<const int,
+DelExplicitTo<int>>::value, "Error");
+
+static_assert(std::is_assignable<B&, B>::value, "Error");
+static_assert(std::is_assignable<B&, D>::value, "Error");
+static_assert(std::is_assignable<B&, B&>::value, "Error");
+static_assert(std::is_assignable<B&, D&>::value, "Error");
+static_assert(!std::is_assignable<const B&, B&>::value, "Error");
+static_assert(!std::is_assignable<const B&, D&>::value, "Error");
+static_assert(!std::is_assignable<D&, B>::value, "Error");
+static_assert(!std::is_assignable<D&, B&>::value, "Error");
+
+static_assert(std::is_assignable<B*&, B*>::value, "Error");
+static_assert(std::is_assignable<B*&, D*>::value, "Error");
+static_assert(std::is_assignable<const B*&, D*>::value, "Error");
+static_assert(std::is_assignable<const B*&, const D*>::value, "Error");
+static_assert(std::is_assignable<B*&, B*&>::value, "Error");
+static_assert(std::is_assignable<B*&, D*&>::value, "Error");
+static_assert(std::is_assignable<const B*&, B*&>::value, "Error");
+static_assert(std::is_assignable<const B*&, D*&>::value, "Error");
+static_assert(!std::is_assignable<B* const&, B*&>::value, "Error");
+static_assert(!std::is_assignable<B* const&, D*&>::value, "Error");
+static_assert(!std::is_assignable<D*&, B*>::value, "Error");
+static_assert(!std::is_assignable<D*&, B*&>::value, "Error");
+
+static_assert(std::is_assignable<MO&, MO>::value, "Error");
+static_assert(std::is_assignable<MO&, MO&&>::value, "Error");
+static_assert(std::is_assignable<MO, MO>::value, "Error");
+static_assert(std::is_assignable<MO, MO&&>::value, "Error");
+
+static_assert(!std::is_assignable<const MO&, MO>::value, "Error");
+static_assert(!std::is_assignable<const MO&, MO&&>::value, "Error");
+static_assert(!std::is_assignable<MO&, const MO&&>::value, "Error");
+static_assert(!std::is_assignable<MO&, MO&>::value, "Error");
+static_assert(!std::is_assignable<MO&, const MO&>::value, "Error");
+static_assert(!std::is_assignable<const MO, MO>::value, "Error");
+static_assert(!std::is_assignable<const MO, MO&&>::value, "Error");
+static_assert(!std::is_assignable<MO, const MO&&>::value, "Error");
+static_assert(!std::is_assignable<MO, MO&>::value, "Error");
+static_assert(!std::is_assignable<MO, const MO&>::value, "Error");
+
+static_assert(!std::is_assignable<NontrivialUnion&,
+NontrivialUnion>::value, "Error");
+static_assert(!std::is_assignable<NontrivialUnion&,
+NontrivialUnion&&>::value, "Error");
+static_assert(!std::is_assignable<NontrivialUnion&,
+NontrivialUnion&>::value, "Error");
+static_assert(!std::is_assignable<NontrivialUnion&, const
+NontrivialUnion&>::value, "Error");
+static_assert(!std::is_assignable<NontrivialUnion&, const
+NontrivialUnion&&>::value, "Error");
+
+static_assert(std::is_assignable<Abstract&, Abstract>::value, "Error");
+static_assert(std::is_assignable<Abstract&, Abstract&&>::value, "Error");
+static_assert(std::is_assignable<Abstract&, Abstract&>::value, "Error");
+static_assert(std::is_assignable<Abstract&, const Abstract&>::value, "Error");
+static_assert(std::is_assignable<Abstract&, const Abstract&&>::value, "Error");
+static_assert(std::is_assignable<Abstract&&, Abstract>::value, "Error");
+static_assert(std::is_assignable<Abstract&&, Abstract&&>::value, "Error");
+static_assert(std::is_assignable<Abstract&&, Abstract&>::value, "Error");
+static_assert(std::is_assignable<Abstract&&, const Abstract&>::value, "Error");
+static_assert(std::is_assignable<Abstract&&, const
+Abstract&&>::value, "Error");
+
+static_assert(std::is_assignable<AbstractDelDtor&,
+AbstractDelDtor>::value, "Error");
+static_assert(std::is_assignable<AbstractDelDtor&,
+AbstractDelDtor&&>::value, "Error");
+static_assert(std::is_assignable<AbstractDelDtor&,
+AbstractDelDtor&>::value, "Error");
+static_assert(std::is_assignable<AbstractDelDtor&, const
+AbstractDelDtor&>::value, "Error");
+static_assert(std::is_assignable<AbstractDelDtor&, const
+AbstractDelDtor&&>::value, "Error");
+static_assert(std::is_assignable<AbstractDelDtor&&,
+AbstractDelDtor>::value, "Error");
+static_assert(std::is_assignable<AbstractDelDtor&&,
+AbstractDelDtor&&>::value, "Error");
+static_assert(std::is_assignable<AbstractDelDtor&&,
+AbstractDelDtor&>::value, "Error");
+static_assert(std::is_assignable<AbstractDelDtor&&, const
+AbstractDelDtor&>::value, "Error");
+static_assert(std::is_assignable<AbstractDelDtor&&, const
+AbstractDelDtor&&>::value, "Error");
+
+static_assert(std::is_assignable<DelDef&, DelDef>::value, "Error");
+static_assert(std::is_assignable<DelDef&, DelDef&&>::value, "Error");
+static_assert(std::is_assignable<DelDef&, DelDef&>::value, "Error");
+static_assert(std::is_assignable<DelDef&, const DelDef&>::value, "Error");
+static_assert(std::is_assignable<DelDef&, const DelDef&&>::value, "Error");
+static_assert(std::is_assignable<DelDef&&, DelDef>::value, "Error");
+static_assert(std::is_assignable<DelDef&&, DelDef&&>::value, "Error");
+static_assert(std::is_assignable<DelDef&&, DelDef&>::value, "Error");
+static_assert(std::is_assignable<DelDef&&, const DelDef&>::value, "Error");
+static_assert(std::is_assignable<DelDef&&, const DelDef&&>::value, "Error");
+
+static_assert(std::is_assignable<Ellipsis&, Ellipsis>::value, "Error");
+static_assert(std::is_assignable<Ellipsis&, const Ellipsis>::value, "Error");
+static_assert(std::is_assignable<Ellipsis&, Ellipsis&>::value, "Error");
+static_assert(std::is_assignable<Ellipsis&, const Ellipsis&>::value, "Error");
+static_assert(std::is_assignable<Ellipsis, Ellipsis>::value, "Error");
+static_assert(std::is_assignable<Ellipsis, const Ellipsis>::value, "Error");
+static_assert(std::is_assignable<Ellipsis, Ellipsis&>::value, "Error");
+static_assert(std::is_assignable<Ellipsis, const Ellipsis&>::value, "Error");
+
+static_assert(!std::is_assignable<Ellipsis&, void>::value, "Error");
+
+static_assert(std::is_assignable<Ellipsis&, int>::value, "Error");
+static_assert(std::is_assignable<Ellipsis&, const int>::value, "Error");
+static_assert(std::is_assignable<Ellipsis&, int&>::value, "Error");
+static_assert(std::is_assignable<Ellipsis&, const int&>::value, "Error");
+static_assert(std::is_assignable<Ellipsis&, Empty>::value, "Error");
+static_assert(std::is_assignable<Ellipsis&, const Empty>::value, "Error");
+static_assert(std::is_assignable<Ellipsis&, Empty&>::value, "Error");
+static_assert(std::is_assignable<Ellipsis&, const Empty&>::value, "Error");
+static_assert(std::is_assignable<Ellipsis&, E>::value, "Error");
+static_assert(std::is_assignable<Ellipsis&, const E>::value, "Error");
+static_assert(std::is_assignable<Ellipsis&, E&>::value, "Error");
+static_assert(std::is_assignable<Ellipsis&, const E&>::value, "Error");
+static_assert(std::is_assignable<Ellipsis&, SE>::value, "Error");
+static_assert(std::is_assignable<Ellipsis&, const SE>::value, "Error");
+static_assert(std::is_assignable<Ellipsis&, SE&>::value, "Error");
+static_assert(std::is_assignable<Ellipsis&, const SE&>::value, "Error");
+static_assert(std::is_assignable<Ellipsis&, bool>::value, "Error");
+static_assert(std::is_assignable<Ellipsis&, const bool>::value, "Error");
+static_assert(std::is_assignable<Ellipsis&, bool&>::value, "Error");
+static_assert(std::is_assignable<Ellipsis&, const bool&>::value, "Error");
+static_assert(std::is_assignable<Ellipsis&, std::nullptr_t>::value, "Error");
+static_assert(std::is_assignable<Ellipsis&, const
+std::nullptr_t>::value, "Error");
+static_assert(std::is_assignable<Ellipsis&, std::nullptr_t&>::value, "Error");
+static_assert(std::is_assignable<Ellipsis&, const
+std::nullptr_t&>::value, "Error");
+static_assert(std::is_assignable<Ellipsis&, void*>::value, "Error");
+static_assert(std::is_assignable<Ellipsis&, const void*>::value, "Error");
+static_assert(std::is_assignable<Ellipsis&, void*&>::value, "Error");
+static_assert(std::is_assignable<Ellipsis&, const void*&>::value, "Error");
+static_assert(std::is_assignable<Ellipsis&, void()>::value, "Error");
+static_assert(std::is_assignable<Ellipsis&, void(&)()>::value, "Error");
+
+static_assert(std::is_assignable<DelEllipsis&, DelEllipsis>::value, "Error");
+static_assert(std::is_assignable<DelEllipsis&, const
+DelEllipsis>::value, "Error");
+static_assert(std::is_assignable<DelEllipsis&, DelEllipsis&>::value, "Error");
+static_assert(std::is_assignable<DelEllipsis&, const
+DelEllipsis&>::value, "Error");
+static_assert(std::is_assignable<DelEllipsis, DelEllipsis>::value, "Error");
+static_assert(std::is_assignable<DelEllipsis, const
+DelEllipsis>::value, "Error");
+static_assert(std::is_assignable<DelEllipsis, DelEllipsis&>::value, "Error");
+static_assert(std::is_assignable<DelEllipsis, const
+DelEllipsis&>::value, "Error");
+
+static_assert(!std::is_assignable<DelEllipsis&, void>::value, "Error");
+static_assert(!std::is_assignable<DelEllipsis&, int>::value, "Error");
+static_assert(!std::is_assignable<DelEllipsis&, const int>::value, "Error");
+static_assert(!std::is_assignable<DelEllipsis&, int&>::value, "Error");
+static_assert(!std::is_assignable<DelEllipsis&, const int&>::value, "Error");
+static_assert(!std::is_assignable<DelEllipsis&, Empty>::value, "Error");
+static_assert(!std::is_assignable<DelEllipsis&, const Empty>::value, "Error");
+static_assert(!std::is_assignable<DelEllipsis&, Empty&>::value, "Error");
+static_assert(!std::is_assignable<DelEllipsis&, const Empty&>::value, "Error");
+static_assert(!std::is_assignable<DelEllipsis&, E>::value, "Error");
+static_assert(!std::is_assignable<DelEllipsis&, const E>::value, "Error");
+static_assert(!std::is_assignable<DelEllipsis&, E&>::value, "Error");
+static_assert(!std::is_assignable<DelEllipsis&, const E&>::value, "Error");
+static_assert(!std::is_assignable<DelEllipsis&, SE>::value, "Error");
+static_assert(!std::is_assignable<DelEllipsis&, const SE>::value, "Error");
+static_assert(!std::is_assignable<DelEllipsis&, SE&>::value, "Error");
+static_assert(!std::is_assignable<DelEllipsis&, const SE&>::value, "Error");
+static_assert(!std::is_assignable<DelEllipsis&, bool>::value, "Error");
+static_assert(!std::is_assignable<DelEllipsis&, const bool>::value, "Error");
+static_assert(!std::is_assignable<DelEllipsis&, bool&>::value, "Error");
+static_assert(!std::is_assignable<DelEllipsis&, const bool&>::value, "Error");
+static_assert(!std::is_assignable<DelEllipsis&,
+std::nullptr_t>::value, "Error");
+static_assert(!std::is_assignable<DelEllipsis&, const
+std::nullptr_t>::value, "Error");
+static_assert(!std::is_assignable<DelEllipsis&,
+std::nullptr_t&>::value, "Error");
+static_assert(!std::is_assignable<DelEllipsis&, const
+std::nullptr_t&>::value, "Error");
+static_assert(!std::is_assignable<DelEllipsis&, void*>::value, "Error");
+static_assert(!std::is_assignable<DelEllipsis&, const void*>::value, "Error");
+static_assert(!std::is_assignable<DelEllipsis&, void*&>::value, "Error");
+static_assert(!std::is_assignable<DelEllipsis&, const void*&>::value, "Error");
+static_assert(!std::is_assignable<DelEllipsis&, void()>::value, "Error");
+static_assert(!std::is_assignable<DelEllipsis&, void(&)()>::value, "Error");
+
+static_assert(std::is_assignable<FromArgs<int>&, int>::value, "Error");
+static_assert(std::is_assignable<FromArgs<int>&, const int>::value, "Error");
+static_assert(!std::is_assignable<FromArgs<int>&,
+ImplicitTo<int>>::value, "Error");
+static_assert(!std::is_assignable<FromArgs<int>&, ImplicitTo<const
+int>>::value, "Error");
+static_assert(!std::is_assignable<FromArgs<int>&,
+ExplicitTo<int>>::value, "Error");
+static_assert(!std::is_assignable<FromArgs<int>&, ExplicitTo<const
+int>>::value, "Error");
+
+static_assert(!std::is_assignable<DelFromArgs<int>&, int>::value, "Error");
+static_assert(!std::is_assignable<DelFromArgs<int>&, const
+int>::value, "Error");
+
+static_assert(std::is_assignable<void(*&)(),
+ImplicitTo<void(*)()>>::value, "Error");
+static_assert(!std::is_assignable<void(*&)(),
+ExplicitTo<void(*)()>>::value, "Error");
+
+static_assert(std::is_assignable<UAssignAll&, UAssignAll>::value, "Error");
+static_assert(std::is_assignable<UAssignAll&, const
+UAssignAll>::value, "Error");
+static_assert(std::is_assignable<UAssignAll&, UAssignAll&>::value, "Error");
+static_assert(std::is_assignable<UAssignAll&, const
+UAssignAll&>::value, "Error");
+
+static_assert(std::is_assignable<UAssignAll, UAssignAll>::value, "Error");
+static_assert(std::is_assignable<UAssignAll, const
+UAssignAll>::value, "Error");
+static_assert(std::is_assignable<UAssignAll, UAssignAll&>::value, "Error");
+static_assert(std::is_assignable<UAssignAll, const
+UAssignAll&>::value, "Error");
+
+static_assert(!std::is_assignable<UAssignAll&, void>::value, "Error");
+static_assert(!std::is_assignable<const UAssignAll&, void>::value, "Error");
+static_assert(!std::is_assignable<const UAssignAll&,
+UAssignAll>::value, "Error");
+static_assert(!std::is_assignable<const UAssignAll&, const
+UAssignAll>::value, "Error");
+static_assert(!std::is_assignable<const UAssignAll&,
+UAssignAll&>::value, "Error");
+static_assert(!std::is_assignable<const UAssignAll&, const
+UAssignAll&>::value, "Error");
+
+static_assert(std::is_assignable<UAssignAll&, int>::value, "Error");
+static_assert(std::is_assignable<UAssignAll&, int&>::value, "Error");
+static_assert(std::is_assignable<UAssignAll&, E>::value, "Error");
+static_assert(std::is_assignable<UAssignAll&, E&>::value, "Error");
+static_assert(std::is_assignable<UAssignAll&, SE>::value, "Error");
+static_assert(std::is_assignable<UAssignAll&, SE&>::value, "Error");
+static_assert(std::is_assignable<UAssignAll&, double>::value, "Error");
+static_assert(std::is_assignable<UAssignAll&, double&>::value, "Error");
+static_assert(std::is_assignable<UAssignAll&, Empty>::value, "Error");
+static_assert(std::is_assignable<UAssignAll&, Empty&>::value, "Error");
+static_assert(std::is_assignable<UAssignAll&, B>::value, "Error");
+static_assert(std::is_assignable<UAssignAll&, B&>::value, "Error");
+static_assert(std::is_assignable<UAssignAll&, U>::value, "Error");
+static_assert(std::is_assignable<UAssignAll&, U&>::value, "Error");
+static_assert(std::is_assignable<UAssignAll&, std::nullptr_t>::value, "Error");
+static_assert(std::is_assignable<UAssignAll&,
+std::nullptr_t&>::value, "Error");
+static_assert(std::is_assignable<UAssignAll&, void()>::value, "Error");
+static_assert(std::is_assignable<UAssignAll&, void(&)()>::value, "Error");
+static_assert(std::is_assignable<UAssignAll&, void() const>::value, "Error");
+static_assert(std::is_assignable<UAssignAll&, void(*)()>::value, "Error");
+static_assert(std::is_assignable<UAssignAll&, void(*&)()>::value, "Error");
+static_assert(std::is_assignable<UAssignAll&, int*>::value, "Error");
+static_assert(std::is_assignable<UAssignAll&, int*&>::value, "Error");
+static_assert(std::is_assignable<UAssignAll&, void*>::value, "Error");
+static_assert(std::is_assignable<UAssignAll&, void*&>::value, "Error");
+static_assert(std::is_assignable<UAssignAll&, const int*>::value, "Error");
+static_assert(std::is_assignable<UAssignAll&, const int*&>::value, "Error");
+static_assert(std::is_assignable<UAssignAll&, const void*>::value, "Error");
+static_assert(std::is_assignable<UAssignAll&, const void*&>::value, "Error");
+static_assert(std::is_assignable<UAssignAll&, int[1]>::value, "Error");
+static_assert(std::is_assignable<UAssignAll&, int(&)[1]>::value, "Error");
+static_assert(std::is_assignable<UAssignAll&, int[]>::value, "Error");
+static_assert(std::is_assignable<UAssignAll&, int(&)[]>::value, "Error");
+
+static_assert(!std::is_assignable<UDelAssignAll&, int>::value, "Error");
+static_assert(!std::is_assignable<UDelAssignAll&, int&>::value, "Error");
+static_assert(!std::is_assignable<UDelAssignAll&, E>::value, "Error");
+static_assert(!std::is_assignable<UDelAssignAll&, E&>::value, "Error");
+static_assert(!std::is_assignable<UDelAssignAll&, SE>::value, "Error");
+static_assert(!std::is_assignable<UDelAssignAll&, SE&>::value, "Error");
+static_assert(!std::is_assignable<UDelAssignAll&, double>::value, "Error");
+static_assert(!std::is_assignable<UDelAssignAll&, double&>::value, "Error");
+static_assert(!std::is_assignable<UDelAssignAll&, Empty>::value, "Error");
+static_assert(!std::is_assignable<UDelAssignAll&, Empty&>::value, "Error");
+static_assert(!std::is_assignable<UDelAssignAll&, B>::value, "Error");
+static_assert(!std::is_assignable<UDelAssignAll&, B&>::value, "Error");
+static_assert(!std::is_assignable<UDelAssignAll&, U>::value, "Error");
+static_assert(!std::is_assignable<UDelAssignAll&, U&>::value, "Error");
+static_assert(!std::is_assignable<UDelAssignAll&,
+std::nullptr_t>::value, "Error");
+static_assert(!std::is_assignable<UDelAssignAll&,
+std::nullptr_t&>::value, "Error");
+static_assert(!std::is_assignable<UDelAssignAll&, void()>::value, "Error");
+static_assert(!std::is_assignable<UDelAssignAll&, void(&)()>::value, "Error");
+static_assert(!std::is_assignable<UDelAssignAll&, void()
+const>::value, "Error");
+static_assert(!std::is_assignable<UDelAssignAll&, void(*)()>::value, "Error");
+static_assert(!std::is_assignable<UDelAssignAll&, void(*&)()>::value, "Error");
+static_assert(!std::is_assignable<UDelAssignAll&, int*>::value, "Error");
+static_assert(!std::is_assignable<UDelAssignAll&, int*&>::value, "Error");
+static_assert(!std::is_assignable<UDelAssignAll&, void*>::value, "Error");
+static_assert(!std::is_assignable<UDelAssignAll&, void*&>::value, "Error");
+static_assert(!std::is_assignable<UDelAssignAll&, const int*>::value, "Error");
+static_assert(!std::is_assignable<UDelAssignAll&, const
+int*&>::value, "Error");
+static_assert(!std::is_assignable<UDelAssignAll&, const
+void*>::value, "Error");
+static_assert(!std::is_assignable<UDelAssignAll&, const
+void*&>::value, "Error");
+static_assert(!std::is_assignable<UDelAssignAll&, int[1]>::value, "Error");
+static_assert(!std::is_assignable<UDelAssignAll&, int(&)[1]>::value, "Error");
+static_assert(!std::is_assignable<UDelAssignAll&, int[]>::value, "Error");
+static_assert(!std::is_assignable<UDelAssignAll&, int(&)[]>::value, "Error");
+
+static_assert(!std::is_assignable<void(&)(), std::nullptr_t>::value, "Error");
+static_assert(!std::is_assignable<std::nullptr_t, void(&)()>::value, "Error");
+static_assert(!std::is_assignable<void(&)(), int[]>::value, "Error");
+static_assert(!std::is_assignable<int[], void(&)()>::value, "Error");
+static_assert(!std::is_assignable<int[], std::nullptr_t>::value, "Error");
+static_assert(!std::is_assignable<std::nullptr_t, int[]>::value, "Error");
+static_assert(!std::is_assignable<int[1], std::nullptr_t>::value, "Error");
+static_assert(!std::is_assignable<std::nullptr_t, int[1]>::value, "Error");
+static_assert(!std::is_assignable<void, std::nullptr_t>::value, "Error");
+static_assert(!std::is_assignable<std::nullptr_t, void>::value, "Error");
+static_assert(!std::is_assignable<const D&, B&>::value, "Error");
+static_assert(!std::is_assignable<const B&, B&>::value, "Error");
+
+static_assert(std::is_assignable<B&, const D&>::value, "Error");
+static_assert(std::is_assignable<B&, const B&>::value, "Error");
+static_assert(std::is_assignable<int&, const int&>::value, "Error");
+static_assert(std::is_assignable<int&, const double&>::value, "Error");
diff --git a/libstdc++-v3/testsuite/20_util/is_copy_assignable/requirements/explicit_instantiation.cc b/libstdc++-v3/testsuite/20_util/is_copy_assignable/requirements/explicit_instantiation.cc
new file mode 100644
index 00000000000..7aaf37e8010
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/is_copy_assignable/requirements/explicit_instantiation.cc
@@ -0,0 +1,30 @@
+// { dg-options "-std=gnu++0x" }
+// { dg-do compile }
+// 2011-05-19 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/>.
+
+// NB: This file is for testing type_traits with NO OTHER INCLUDES.
+
+#include <type_traits>
+
+namespace std
+{
+ typedef short test_type;
+ template struct is_copy_assignable<test_type>;
+}
diff --git a/libstdc++-v3/testsuite/20_util/is_copy_assignable/requirements/typedefs.cc b/libstdc++-v3/testsuite/20_util/is_copy_assignable/requirements/typedefs.cc
new file mode 100644
index 00000000000..14366213afa
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/is_copy_assignable/requirements/typedefs.cc
@@ -0,0 +1,36 @@
+// { dg-options "-std=gnu++0x" }
+// 2011-05-19 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/>.
+
+//
+// NB: This file is for testing type_traits with NO OTHER INCLUDES.
+
+#include <type_traits>
+
+// { dg-do compile }
+
+void test01()
+{
+ // Check for required typedefs
+ typedef std::is_copy_assignable<int> test_type;
+ typedef test_type::value_type value_type;
+ typedef test_type::type type;
+ typedef test_type::type::value_type type_value_type;
+ typedef test_type::type::type type_type;
+}
diff --git a/libstdc++-v3/testsuite/20_util/is_copy_assignable/value.cc b/libstdc++-v3/testsuite/20_util/is_copy_assignable/value.cc
new file mode 100644
index 00000000000..662c834bd29
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/is_copy_assignable/value.cc
@@ -0,0 +1,66 @@
+// { dg-options "-std=gnu++0x" }
+// 2011-05-19 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 <type_traits>
+#include <testsuite_hooks.h>
+#include <testsuite_tr1.h>
+
+void test01()
+{
+ bool test __attribute__((unused)) = true;
+ using std::is_copy_assignable;
+ using namespace __gnu_test;
+
+ // Positive tests.
+ VERIFY( (test_property<is_copy_assignable, int>(true)) );
+ VERIFY( (test_property<is_copy_assignable, float>(true)) );
+ VERIFY( (test_property<is_copy_assignable, EnumType>(true)) );
+ VERIFY( (test_property<is_copy_assignable, int*>(true)) );
+ VERIFY( (test_property<is_copy_assignable, int(*)(int)>(true)) );
+ VERIFY( (test_property<is_copy_assignable, int (ClassType::*)>(true)) );
+ VERIFY( (test_property<is_copy_assignable,
+ int (ClassType::*) (int)>(true)) );
+
+ VERIFY( (test_property<is_copy_assignable, NoexceptCopyAssignClass>(true)) );
+ VERIFY( (test_property<is_copy_assignable, ExceptCopyAssignClass>(true)) );
+
+ // Negative tests.
+ VERIFY( (test_property<is_copy_assignable, void>(false)) );
+ VERIFY( (test_property<is_copy_assignable, int[2]>(false)) );
+ VERIFY( (test_property<is_copy_assignable, float[][3]>(false)) );
+ VERIFY( (test_property<is_copy_assignable, EnumType[2][3][4]>(false)) );
+ VERIFY( (test_property<is_copy_assignable, int*[3]>(false)) );
+ VERIFY( (test_property<is_copy_assignable, int(*[][2])(int)>(false)) );
+ VERIFY( (test_property<is_copy_assignable,
+ int (ClassType::*[2][3])>(false)) );
+ VERIFY( (test_property<is_copy_assignable,
+ int (ClassType::*[][2][3]) (int)>(false)) );
+
+ VERIFY( (test_property<is_copy_assignable, NoexceptMoveAssignClass>(false)) );
+ VERIFY( (test_property<is_copy_assignable, ExceptMoveAssignClass>(false)) );
+ VERIFY( (test_property<is_copy_assignable, DeletedCopyAssignClass>(false)) );
+ VERIFY( (test_property<is_copy_assignable, DeletedMoveAssignClass>(false)) );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/20_util/is_move_assignable/requirements/explicit_instantiation.cc b/libstdc++-v3/testsuite/20_util/is_move_assignable/requirements/explicit_instantiation.cc
new file mode 100644
index 00000000000..e85a7464300
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/is_move_assignable/requirements/explicit_instantiation.cc
@@ -0,0 +1,30 @@
+// { dg-options "-std=gnu++0x" }
+// { dg-do compile }
+// 2011-05-19 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/>.
+
+// NB: This file is for testing type_traits with NO OTHER INCLUDES.
+
+#include <type_traits>
+
+namespace std
+{
+ typedef short test_type;
+ template struct is_move_assignable<test_type>;
+}
diff --git a/libstdc++-v3/testsuite/20_util/is_move_assignable/requirements/typedefs.cc b/libstdc++-v3/testsuite/20_util/is_move_assignable/requirements/typedefs.cc
new file mode 100644
index 00000000000..23b8aa81658
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/is_move_assignable/requirements/typedefs.cc
@@ -0,0 +1,36 @@
+// { dg-options "-std=gnu++0x" }
+// 2011-05-19 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/>.
+
+//
+// NB: This file is for testing type_traits with NO OTHER INCLUDES.
+
+#include <type_traits>
+
+// { dg-do compile }
+
+void test01()
+{
+ // Check for required typedefs
+ typedef std::is_move_assignable<int> test_type;
+ typedef test_type::value_type value_type;
+ typedef test_type::type type;
+ typedef test_type::type::value_type type_value_type;
+ typedef test_type::type::type type_type;
+}
diff --git a/libstdc++-v3/testsuite/20_util/is_move_assignable/value.cc b/libstdc++-v3/testsuite/20_util/is_move_assignable/value.cc
new file mode 100644
index 00000000000..a7dff82e0bd
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/is_move_assignable/value.cc
@@ -0,0 +1,66 @@
+// { dg-options "-std=gnu++0x" }
+// 2011-05-19 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 <type_traits>
+#include <testsuite_hooks.h>
+#include <testsuite_tr1.h>
+
+void test01()
+{
+ bool test __attribute__((unused)) = true;
+ using std::is_move_assignable;
+ using namespace __gnu_test;
+
+ // Positive tests.
+ VERIFY( (test_property<is_move_assignable, int>(true)) );
+ VERIFY( (test_property<is_move_assignable, float>(true)) );
+ VERIFY( (test_property<is_move_assignable, EnumType>(true)) );
+ VERIFY( (test_property<is_move_assignable, int*>(true)) );
+ VERIFY( (test_property<is_move_assignable, int(*)(int)>(true)) );
+ VERIFY( (test_property<is_move_assignable, int (ClassType::*)>(true)) );
+ VERIFY( (test_property<is_move_assignable,
+ int (ClassType::*) (int)>(true)) );
+
+ VERIFY( (test_property<is_move_assignable, NoexceptMoveAssignClass>(true)) );
+ VERIFY( (test_property<is_move_assignable, ExceptMoveAssignClass>(true)) );
+ VERIFY( (test_property<is_move_assignable, NoexceptCopyAssignClass>(true)) );
+ VERIFY( (test_property<is_move_assignable, ExceptCopyAssignClass>(true)) );
+
+ // Negative tests.
+ VERIFY( (test_property<is_move_assignable, void>(false)) );
+ VERIFY( (test_property<is_move_assignable, int[2]>(false)) );
+ VERIFY( (test_property<is_move_assignable, float[][3]>(false)) );
+ VERIFY( (test_property<is_move_assignable, EnumType[2][3][4]>(false)) );
+ VERIFY( (test_property<is_move_assignable, int*[3]>(false)) );
+ VERIFY( (test_property<is_move_assignable, int(*[][2])(int)>(false)) );
+ VERIFY( (test_property<is_move_assignable,
+ int (ClassType::*[2][3])>(false)) );
+ VERIFY( (test_property<is_move_assignable,
+ int (ClassType::*[][2][3]) (int)>(false)) );
+
+ VERIFY( (test_property<is_move_assignable, DeletedCopyAssignClass>(false)) );
+ VERIFY( (test_property<is_move_assignable, DeletedMoveAssignClass>(false)) );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/20_util/is_nothrow_assignable/requirements/explicit_instantiation.cc b/libstdc++-v3/testsuite/20_util/is_nothrow_assignable/requirements/explicit_instantiation.cc
new file mode 100644
index 00000000000..d3ebe8b1f7a
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/is_nothrow_assignable/requirements/explicit_instantiation.cc
@@ -0,0 +1,31 @@
+// { dg-options "-std=gnu++0x" }
+// { dg-do compile }
+
+// 2011-05-19 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/>.
+
+// NB: This file is for testing type_traits with NO OTHER INCLUDES.
+
+#include <type_traits>
+
+namespace std
+{
+ typedef short test_type;
+ template struct is_nothrow_assignable<test_type, test_type>;
+}
diff --git a/libstdc++-v3/testsuite/20_util/is_nothrow_assignable/requirements/typedefs.cc b/libstdc++-v3/testsuite/20_util/is_nothrow_assignable/requirements/typedefs.cc
new file mode 100644
index 00000000000..7baeb6f0aa5
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/is_nothrow_assignable/requirements/typedefs.cc
@@ -0,0 +1,36 @@
+// { dg-options "-std=gnu++0x" }
+// { dg-do compile }
+
+// 2011-05-19 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/>.
+
+//
+// NB: This file is for testing type_traits with NO OTHER INCLUDES.
+
+#include <type_traits>
+
+void test01()
+{
+ // Check for required typedefs
+ typedef std::is_nothrow_assignable<int, int> test_type;
+ typedef test_type::value_type value_type;
+ typedef test_type::type type;
+ typedef test_type::type::value_type type_value_type;
+ typedef test_type::type::type type_type;
+}
diff --git a/libstdc++-v3/testsuite/20_util/is_nothrow_assignable/value.cc b/libstdc++-v3/testsuite/20_util/is_nothrow_assignable/value.cc
new file mode 100644
index 00000000000..6414faf0e47
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/is_nothrow_assignable/value.cc
@@ -0,0 +1,58 @@
+// { dg-options "-std=gnu++0x" }
+// 2011-05-19 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 <type_traits>
+#include <testsuite_hooks.h>
+#include <testsuite_tr1.h>
+
+void test01()
+{
+ bool test __attribute__((unused)) = true;
+ using std::is_nothrow_assignable;
+ using namespace __gnu_test;
+
+ // Positive tests.
+ VERIFY( (test_relationship<is_nothrow_assignable, int&, int>(true)) );
+ VERIFY( (test_relationship<is_nothrow_assignable, int&, const int>(true)) );
+
+ VERIFY( (test_relationship<is_nothrow_assignable,
+ NoexceptCopyAssignClass&, const NoexceptCopyAssignClass&>(true)) );
+ VERIFY( (test_relationship<is_nothrow_assignable,
+ NoexceptMoveAssignClass&, NoexceptMoveAssignClass&&>(true)) );
+ VERIFY( (test_relationship<is_nothrow_assignable,
+ NoexceptCopyAssignClass&, NoexceptCopyAssignClass&&>(true)) );
+
+ // Negative tests.
+ VERIFY( (test_relationship<is_nothrow_assignable, int, int>(false)) );
+ VERIFY( (test_relationship<is_nothrow_assignable, int, const int>(false)) );
+
+ VERIFY( (test_relationship<is_nothrow_assignable,
+ ExceptCopyAssignClass&, const ExceptCopyAssignClass&>(false)) );
+ VERIFY( (test_relationship<is_nothrow_assignable,
+ ExceptMoveAssignClass&, ExceptMoveAssignClass&&>(false)) );
+ VERIFY( (test_relationship<is_nothrow_assignable,
+ NoexceptMoveAssignClass&, const NoexceptMoveAssignClass&>(false)) );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/20_util/has_nothrow_copy_assign/requirements/explicit_instantiation.cc b/libstdc++-v3/testsuite/20_util/is_nothrow_copy_assignable/requirements/explicit_instantiation.cc
index 0a4a6224b8a..406c60036f1 100644
--- a/libstdc++-v3/testsuite/20_util/has_nothrow_copy_assign/requirements/explicit_instantiation.cc
+++ b/libstdc++-v3/testsuite/20_util/is_nothrow_copy_assignable/requirements/explicit_instantiation.cc
@@ -2,7 +2,7 @@
// { dg-do compile }
// 2010-06-08 Paolo Carlini <paolo.carlini@oracle.com>
-// Copyright (C) 2010 Free Software Foundation, Inc.
+// Copyright (C) 2010, 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
@@ -26,5 +26,5 @@
namespace std
{
typedef short test_type;
- template struct has_nothrow_copy_assign<test_type>;
+ template struct is_nothrow_copy_assignable<test_type>;
}
diff --git a/libstdc++-v3/testsuite/20_util/is_nothrow_copy_assignable/requirements/typedefs.cc b/libstdc++-v3/testsuite/20_util/is_nothrow_copy_assignable/requirements/typedefs.cc
new file mode 100644
index 00000000000..52876fe31a2
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/is_nothrow_copy_assignable/requirements/typedefs.cc
@@ -0,0 +1,36 @@
+// { dg-options "-std=gnu++0x" }
+// 2010-06-08 Paolo Carlini <paolo.carlini@oracle.com>
+//
+// Copyright (C) 2010, 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/>.
+
+//
+// NB: This file is for testing type_traits with NO OTHER INCLUDES.
+
+#include <type_traits>
+
+// { dg-do compile }
+
+void test01()
+{
+ // Check for required typedefs
+ typedef std::is_nothrow_copy_assignable<int> test_type;
+ typedef test_type::value_type value_type;
+ typedef test_type::type type;
+ typedef test_type::type::value_type type_value_type;
+ typedef test_type::type::type type_type;
+}
diff --git a/libstdc++-v3/testsuite/20_util/is_nothrow_copy_assignable/value.cc b/libstdc++-v3/testsuite/20_util/is_nothrow_copy_assignable/value.cc
new file mode 100644
index 00000000000..f008bfca7c1
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/is_nothrow_copy_assignable/value.cc
@@ -0,0 +1,75 @@
+// { dg-options "-std=gnu++0x" }
+// 2010-06-08 Paolo Carlini <paolo.carlini@oracle.com>
+//
+// Copyright (C) 2010, 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 <type_traits>
+#include <testsuite_hooks.h>
+#include <testsuite_tr1.h>
+
+void test01()
+{
+ bool test __attribute__((unused)) = true;
+ using std::is_nothrow_copy_assignable;
+ using namespace __gnu_test;
+
+ // Positive tests.
+ VERIFY( (test_property<is_nothrow_copy_assignable, int>(true)) );
+ VERIFY( (test_property<is_nothrow_copy_assignable, float>(true)) );
+ VERIFY( (test_property<is_nothrow_copy_assignable, EnumType>(true)) );
+ VERIFY( (test_property<is_nothrow_copy_assignable, int*>(true)) );
+ VERIFY( (test_property<is_nothrow_copy_assignable, int(*)(int)>(true)) );
+ VERIFY( (test_property<is_nothrow_copy_assignable,
+ int (ClassType::*)>(true)) );
+ VERIFY( (test_property<is_nothrow_copy_assignable,
+ int (ClassType::*) (int)>(true)) );
+
+ VERIFY( (test_property<is_nothrow_copy_assignable,
+ NoexceptCopyAssignClass>(true)) );
+
+ // Negative tests.
+ VERIFY( (test_property<is_nothrow_copy_assignable, void>(false)) );
+ VERIFY( (test_property<is_nothrow_copy_assignable, int[2]>(false)) );
+ VERIFY( (test_property<is_nothrow_copy_assignable, float[][3]>(false)) );
+ VERIFY( (test_property<is_nothrow_copy_assignable,
+ EnumType[2][3][4]>(false)) );
+ VERIFY( (test_property<is_nothrow_copy_assignable, int*[3]>(false)) );
+ VERIFY( (test_property<is_nothrow_copy_assignable,
+ int(*[][2])(int)>(false)) );
+ VERIFY( (test_property<is_nothrow_copy_assignable,
+ int (ClassType::*[2][3])>(false)) );
+ VERIFY( (test_property<is_nothrow_copy_assignable,
+ int (ClassType::*[][2][3]) (int)>(false)) );
+
+ VERIFY( (test_property<is_nothrow_copy_assignable,
+ ExceptCopyAssignClass>(false)) );
+ VERIFY( (test_property<is_nothrow_copy_assignable,
+ NoexceptMoveAssignClass>(false)) );
+ VERIFY( (test_property<is_nothrow_copy_assignable,
+ ExceptMoveAssignClass>(false)) );
+ VERIFY( (test_property<is_nothrow_copy_assignable,
+ DeletedCopyAssignClass>(false)) );
+ VERIFY( (test_property<is_nothrow_copy_assignable,
+ DeletedMoveAssignClass>(false)) );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/20_util/is_nothrow_move_assignable/requirements/explicit_instantiation.cc b/libstdc++-v3/testsuite/20_util/is_nothrow_move_assignable/requirements/explicit_instantiation.cc
new file mode 100644
index 00000000000..c360102128e
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/is_nothrow_move_assignable/requirements/explicit_instantiation.cc
@@ -0,0 +1,30 @@
+// { dg-options "-std=gnu++0x" }
+// { dg-do compile }
+// 2011-05-19 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/>.
+
+// NB: This file is for testing type_traits with NO OTHER INCLUDES.
+
+#include <type_traits>
+
+namespace std
+{
+ typedef short test_type;
+ template struct is_nothrow_move_assignable<test_type>;
+}
diff --git a/libstdc++-v3/testsuite/20_util/is_nothrow_move_assignable/requirements/typedefs.cc b/libstdc++-v3/testsuite/20_util/is_nothrow_move_assignable/requirements/typedefs.cc
new file mode 100644
index 00000000000..33e0cba43d7
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/is_nothrow_move_assignable/requirements/typedefs.cc
@@ -0,0 +1,36 @@
+// { dg-options "-std=gnu++0x" }
+// 2011-05-19 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/>.
+
+//
+// NB: This file is for testing type_traits with NO OTHER INCLUDES.
+
+#include <type_traits>
+
+// { dg-do compile }
+
+void test01()
+{
+ // Check for required typedefs
+ typedef std::is_nothrow_move_assignable<int> test_type;
+ typedef test_type::value_type value_type;
+ typedef test_type::type type;
+ typedef test_type::type::value_type type_value_type;
+ typedef test_type::type::type type_type;
+}
diff --git a/libstdc++-v3/testsuite/20_util/is_nothrow_move_assignable/value.cc b/libstdc++-v3/testsuite/20_util/is_nothrow_move_assignable/value.cc
new file mode 100644
index 00000000000..3eec9b086d5
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/is_nothrow_move_assignable/value.cc
@@ -0,0 +1,75 @@
+// { dg-options "-std=gnu++0x" }
+// 2011-05-19 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 <type_traits>
+#include <testsuite_hooks.h>
+#include <testsuite_tr1.h>
+
+void test01()
+{
+ bool test __attribute__((unused)) = true;
+ using std::is_nothrow_move_assignable;
+ using namespace __gnu_test;
+
+ // Positive tests.
+ VERIFY( (test_property<is_nothrow_move_assignable, int>(true)) );
+ VERIFY( (test_property<is_nothrow_move_assignable, float>(true)) );
+ VERIFY( (test_property<is_nothrow_move_assignable, EnumType>(true)) );
+ VERIFY( (test_property<is_nothrow_move_assignable, int*>(true)) );
+ VERIFY( (test_property<is_nothrow_move_assignable, int(*)(int)>(true)) );
+ VERIFY( (test_property<is_nothrow_move_assignable,
+ int (ClassType::*)>(true)) );
+ VERIFY( (test_property<is_nothrow_move_assignable,
+ int (ClassType::*) (int)>(true)) );
+
+ VERIFY( (test_property<is_nothrow_move_assignable,
+ NoexceptMoveAssignClass>(true)) );
+ VERIFY( (test_property<is_nothrow_move_assignable,
+ NoexceptCopyAssignClass>(true)) );
+
+ // Negative tests.
+ VERIFY( (test_property<is_nothrow_move_assignable, void>(false)) );
+ VERIFY( (test_property<is_nothrow_move_assignable, int[2]>(false)) );
+ VERIFY( (test_property<is_nothrow_move_assignable, float[][3]>(false)) );
+ VERIFY( (test_property<is_nothrow_move_assignable,
+ EnumType[2][3][4]>(false)) );
+ VERIFY( (test_property<is_nothrow_move_assignable, int*[3]>(false)) );
+ VERIFY( (test_property<is_nothrow_move_assignable,
+ int(*[][2])(int)>(false)) );
+ VERIFY( (test_property<is_nothrow_move_assignable,
+ int (ClassType::*[2][3])>(false)) );
+ VERIFY( (test_property<is_nothrow_move_assignable,
+ int (ClassType::*[][2][3]) (int)>(false)) );
+
+ VERIFY( (test_property<is_nothrow_move_assignable,
+ ExceptMoveAssignClass>(false)) );
+ VERIFY( (test_property<is_nothrow_move_assignable,
+ ExceptCopyAssignClass>(false)) );
+ VERIFY( (test_property<is_nothrow_move_assignable,
+ DeletedMoveAssignClass>(false)) );
+ VERIFY( (test_property<is_nothrow_move_assignable,
+ DeletedCopyAssignClass>(false)) );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/20_util/make_signed/requirements/typedefs_neg.cc b/libstdc++-v3/testsuite/20_util/make_signed/requirements/typedefs_neg.cc
index 01a2068e6e7..c92df36b348 100644
--- a/libstdc++-v3/testsuite/20_util/make_signed/requirements/typedefs_neg.cc
+++ b/libstdc++-v3/testsuite/20_util/make_signed/requirements/typedefs_neg.cc
@@ -48,5 +48,5 @@ void test01()
// { dg-error "instantiated from here" "" { target *-*-* } 40 }
// { dg-error "instantiated from here" "" { target *-*-* } 42 }
-// { dg-error "invalid use of incomplete type" "" { target *-*-* } 1401 }
-// { dg-error "declaration of" "" { target *-*-* } 1365 }
+// { dg-error "invalid use of incomplete type" "" { target *-*-* } 1501 }
+// { dg-error "declaration of" "" { target *-*-* } 1465 }
diff --git a/libstdc++-v3/testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc b/libstdc++-v3/testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc
index 7dd19d63127..2bb62cba715 100644
--- a/libstdc++-v3/testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc
+++ b/libstdc++-v3/testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc
@@ -48,5 +48,5 @@ void test01()
// { dg-error "instantiated from here" "" { target *-*-* } 40 }
// { dg-error "instantiated from here" "" { target *-*-* } 42 }
-// { dg-error "invalid use of incomplete type" "" { target *-*-* } 1325 }
-// { dg-error "declaration of" "" { target *-*-* } 1289 }
+// { dg-error "invalid use of incomplete type" "" { target *-*-* } 1425 }
+// { dg-error "declaration of" "" { target *-*-* } 1389 }
diff --git a/libstdc++-v3/testsuite/20_util/pair/get.cc b/libstdc++-v3/testsuite/20_util/pair/get.cc
new file mode 100644
index 00000000000..3b68a1f9bd1
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/pair/get.cc
@@ -0,0 +1,31 @@
+// { dg-do compile }
+// { dg-options "-std=gnu++0x" }
+
+// 2011-05-16 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 <utility>
+
+void test01()
+{
+ std::pair<float, int> p;
+
+ float&& pfirst __attribute__((unused)) = std::get<0>(std::move(p));
+ int&& psecond __attribute__((unused)) = std::get<1>(std::move(p));
+}
diff --git a/libstdc++-v3/testsuite/20_util/shared_ptr/cons/43820_neg.cc b/libstdc++-v3/testsuite/20_util/shared_ptr/cons/43820_neg.cc
index 36cf7f9c29d..42354d4999d 100644
--- a/libstdc++-v3/testsuite/20_util/shared_ptr/cons/43820_neg.cc
+++ b/libstdc++-v3/testsuite/20_util/shared_ptr/cons/43820_neg.cc
@@ -32,9 +32,9 @@ void test01()
{
X* px = 0;
std::shared_ptr<X> p1(px); // { dg-error "here" }
- // { dg-error "incomplete" "" { target *-*-* } 766 }
+ // { dg-error "incomplete" "" { target *-*-* } 768 }
std::shared_ptr<X> p9(ap()); // { dg-error "here" }
- // { dg-error "incomplete" "" { target *-*-* } 858 }
+ // { dg-error "incomplete" "" { target *-*-* } 862 }
}
diff --git a/libstdc++-v3/testsuite/20_util/tuple/cv_tuple_element.cc b/libstdc++-v3/testsuite/20_util/tuple/cv_tuple_element.cc
new file mode 100644
index 00000000000..df4fb435e53
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/tuple/cv_tuple_element.cc
@@ -0,0 +1,34 @@
+// { dg-do compile }
+// { dg-options "-std=gnu++0x" }
+
+// 2011-05-19 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/>.
+
+// Tuple
+
+#include <tuple>
+
+using namespace std;
+
+static_assert(is_same<tuple_element<0, const tuple<double, void, int>>::type,
+ const double>::value, "Error");
+static_assert(is_same<tuple_element<1, volatile tuple<short, void>>::type,
+ volatile void>::value, "Error");
+static_assert(is_same<tuple_element<2, const volatile tuple<float,
+ char, int>>::type, const volatile int>::value, "Error");
diff --git a/libstdc++-v3/testsuite/20_util/tuple/cv_tuple_size.cc b/libstdc++-v3/testsuite/20_util/tuple/cv_tuple_size.cc
new file mode 100644
index 00000000000..8224528f4df
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/tuple/cv_tuple_size.cc
@@ -0,0 +1,45 @@
+// { dg-options "-std=gnu++0x" }
+
+// 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/>.
+
+// Tuple
+
+#include <tuple>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+ bool test __attribute__((unused)) = true;
+ using namespace std;
+
+ VERIFY( tuple_size<const tuple<> >::value == 0 );
+ VERIFY( tuple_size<volatile tuple<int> >::value == 1 );
+ VERIFY( tuple_size<const volatile tuple<void> >::value == 1 );
+
+ typedef tuple<int, const int&, void> test_tuple1;
+ VERIFY( tuple_size<const test_tuple1>::value == 3 );
+ VERIFY( tuple_size<const volatile test_tuple1>::value == 3 );
+ VERIFY( tuple_size<volatile tuple<tuple<void> > >::value == 1 );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/20_util/tuple/element_access/get2.cc b/libstdc++-v3/testsuite/20_util/tuple/element_access/get2.cc
new file mode 100644
index 00000000000..ccaedf402c8
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/tuple/element_access/get2.cc
@@ -0,0 +1,41 @@
+// { dg-do compile }
+// { dg-options "-std=gnu++0x" }
+
+// 2011-05-17 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 <tuple>
+
+void test01()
+{
+ std::tuple<int> t1;
+
+ int&& t1one __attribute__((unused)) = std::get<0>(std::move(t1));
+
+ std::tuple<float, int> t2;
+
+ float&& t2one __attribute__((unused)) = std::get<0>(std::move(t2));
+ int&& t2two __attribute__((unused)) = std::get<1>(std::move(t2));
+
+ std::tuple<short, int, double> t3;
+
+ short&& t3one __attribute__((unused)) = std::get<0>(std::move(t3));
+ int&& t3two __attribute__((unused)) = std::get<1>(std::move(t3));
+ double&& t3thr __attribute__((unused)) = std::get<2>(std::move(t3));
+}
diff --git a/libstdc++-v3/testsuite/20_util/tuple/noexcept_move_assign.cc b/libstdc++-v3/testsuite/20_util/tuple/noexcept_move_assign.cc
new file mode 100644
index 00000000000..7acf0b95358
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/tuple/noexcept_move_assign.cc
@@ -0,0 +1,59 @@
+// { dg-do compile }
+// { dg-options "-std=gnu++0x" }
+
+// 2011-05-19 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 <tuple>
+#include <testsuite_tr1.h>
+
+using namespace __gnu_test;
+
+typedef std::tuple<int> tt1;
+typedef std::tuple<int, double> tt2;
+typedef std::tuple<short, double, int> tt3;
+typedef std::tuple<short, NoexceptMoveAssignClass, double> tt4;
+typedef std::tuple<NoexceptMoveAssignClass,
+ NoexceptMoveAssignClass, double> tt5;
+typedef std::tuple<NoexceptMoveAssignClass,
+ NoexceptMoveAssignClass,
+ NoexceptMoveAssignClass> tt6;
+typedef std::tuple<ExceptMoveAssignClass> tt7;
+typedef std::tuple<ExceptMoveAssignClass, double> tt8;
+typedef std::tuple<short, double, ExceptMoveAssignClass> tt9;
+typedef std::tuple<ExceptMoveAssignClass, double,
+ ExceptMoveAssignClass> tt10;
+typedef std::tuple<NoexceptMoveAssignClass,
+ ExceptMoveAssignClass> tt11;
+typedef std::tuple<int,
+ NoexceptMoveAssignClass,
+ ExceptMoveAssignClass> tt12;
+
+static_assert(std::is_nothrow_move_assignable<tt1>::value, "Error");
+static_assert(std::is_nothrow_move_assignable<tt2>::value, "Error");
+static_assert(std::is_nothrow_move_assignable<tt3>::value, "Error");
+static_assert(std::is_nothrow_move_assignable<tt4>::value, "Error");
+static_assert(std::is_nothrow_move_assignable<tt5>::value, "Error");
+static_assert(std::is_nothrow_move_assignable<tt6>::value, "Error");
+static_assert(!std::is_nothrow_move_assignable<tt7>::value, "Error");
+static_assert(!std::is_nothrow_move_assignable<tt8>::value, "Error");
+static_assert(!std::is_nothrow_move_assignable<tt9>::value, "Error");
+static_assert(!std::is_nothrow_move_assignable<tt10>::value, "Error");
+static_assert(!std::is_nothrow_move_assignable<tt11>::value, "Error");
+static_assert(!std::is_nothrow_move_assignable<tt12>::value, "Error");
diff --git a/libstdc++-v3/testsuite/20_util/tuple/noexcept_swap.cc b/libstdc++-v3/testsuite/20_util/tuple/noexcept_swap.cc
new file mode 100644
index 00000000000..4ad327036fa
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/tuple/noexcept_swap.cc
@@ -0,0 +1,116 @@
+// { dg-do compile }
+// { dg-options "-std=gnu++0x" }
+
+// 2011-05-19 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 <tuple>
+#include <testsuite_tr1.h>
+
+using namespace __gnu_test;
+
+typedef std::tuple<int> tt1;
+typedef std::tuple<int, double> tt2;
+typedef std::tuple<short, double, int> tt3;
+typedef std::tuple<short, NoexceptMoveAssignClass, double> tt4;
+typedef std::tuple<ExceptMoveAssignClass> tt5;
+typedef std::tuple<ExceptMoveAssignClass, double> tt6;
+typedef std::tuple<short, double, ExceptMoveAssignClass> tt7;
+typedef std::tuple<ExceptMoveConsClass> tt8;
+typedef std::tuple<int, ExceptMoveConsClass> tt9;
+typedef std::tuple<ExceptMoveConsClass, short, double> tt10;
+typedef std::tuple<short, NoexceptMoveConsClass, double> tt11;
+typedef std::tuple<NoexceptMoveConsClass> tt12;
+typedef std::tuple<NoexceptMoveConsNoexceptMoveAssignClass> tt13;
+typedef std::tuple<ExceptMoveConsNoexceptMoveAssignClass> tt14;
+typedef std::tuple<NoexceptMoveConsExceptMoveAssignClass> tt15;
+typedef std::tuple<ExceptMoveConsExceptMoveAssignClass> tt16;
+typedef std::tuple<NoexceptMoveConsNoexceptMoveAssignClass,
+ double> tt17;
+typedef std::tuple<double,
+ NoexceptMoveConsNoexceptMoveAssignClass,
+ short> tt18;
+typedef std::tuple<NoexceptMoveConsNoexceptMoveAssignClass,
+ NoexceptMoveConsNoexceptMoveAssignClass,
+ char> tt19;
+typedef std::tuple<NoexceptMoveConsNoexceptMoveAssignClass,
+ NoexceptMoveConsNoexceptMoveAssignClass,
+ NoexceptMoveConsNoexceptMoveAssignClass> tt20;
+typedef std::tuple<NoexceptMoveConsNoexceptMoveAssignClass,
+ ExceptMoveConsNoexceptMoveAssignClass,
+ NoexceptMoveConsNoexceptMoveAssignClass> tt21;
+typedef std::tuple<NoexceptMoveConsNoexceptMoveAssignClass,
+ ExceptMoveConsNoexceptMoveAssignClass,
+ NoexceptMoveConsExceptMoveAssignClass> tt22;
+typedef std::tuple<NoexceptMoveConsNoexceptMoveAssignClass,
+ NoexceptMoveConsNoexceptMoveAssignClass,
+ ExceptMoveConsExceptMoveAssignClass> tt23;
+typedef std::tuple<NoexceptMoveConsNoexceptMoveAssignClass,
+ short, ExceptMoveConsExceptMoveAssignClass> tt24;
+typedef std::tuple<NoexceptMoveConsNoexceptMoveAssignClass,
+ short, ExceptMoveConsExceptMoveAssignClass> tt25;
+
+static_assert(noexcept(std::declval<tt1&>().swap(std::declval<tt1&>())),
+ "Error");
+static_assert(noexcept(std::declval<tt2&>().swap(std::declval<tt2&>())),
+ "Error");
+static_assert(noexcept(std::declval<tt3&>().swap(std::declval<tt3&>())),
+ "Error");
+static_assert(noexcept(std::declval<tt4&>().swap(std::declval<tt4&>())),
+ "Error");
+static_assert(!noexcept(std::declval<tt5&>().swap(std::declval<tt5&>())),
+ "Error");
+static_assert(!noexcept(std::declval<tt6&>().swap(std::declval<tt6&>())),
+ "Error");
+static_assert(!noexcept(std::declval<tt7&>().swap(std::declval<tt7&>())),
+ "Error");
+static_assert(!noexcept(std::declval<tt8&>().swap(std::declval<tt8&>())),
+ "Error");
+static_assert(!noexcept(std::declval<tt9&>().swap(std::declval<tt9&>())),
+ "Error");
+static_assert(!noexcept(std::declval<tt10&>().swap(std::declval<tt10&>())),
+ "Error");
+static_assert(noexcept(std::declval<tt11&>().swap(std::declval<tt11&>())),
+ "Error");
+static_assert(noexcept(std::declval<tt12&>().swap(std::declval<tt12&>())),
+ "Error");
+static_assert(noexcept(std::declval<tt13&>().swap(std::declval<tt13&>())),
+ "Error");
+static_assert(!noexcept(std::declval<tt14&>().swap(std::declval<tt14&>())),
+ "Error");
+static_assert(!noexcept(std::declval<tt15&>().swap(std::declval<tt15&>())),
+ "Error");
+static_assert(!noexcept(std::declval<tt16&>().swap(std::declval<tt16&>())),
+ "Error");
+static_assert(noexcept(std::declval<tt17&>().swap(std::declval<tt17&>())),
+ "Error");
+static_assert(noexcept(std::declval<tt18&>().swap(std::declval<tt18&>())),
+ "Error");
+static_assert(noexcept(std::declval<tt19&>().swap(std::declval<tt19&>())),
+ "Error");
+static_assert(noexcept(std::declval<tt20&>().swap(std::declval<tt20&>())),
+ "Error");
+static_assert(!noexcept(std::declval<tt21&>().swap(std::declval<tt21&>())),
+ "Error");
+static_assert(!noexcept(std::declval<tt22&>().swap(std::declval<tt22&>())),
+ "Error");
+static_assert(!noexcept(std::declval<tt23&>().swap(std::declval<tt23&>())),
+ "Error");
+static_assert(!noexcept(std::declval<tt24&>().swap(std::declval<tt24&>())),
+ "Error");
diff --git a/libstdc++-v3/testsuite/20_util/weak_ptr/comparison/cmp_neg.cc b/libstdc++-v3/testsuite/20_util/weak_ptr/comparison/cmp_neg.cc
index f81e5afb0c7..d449be317ad 100644
--- a/libstdc++-v3/testsuite/20_util/weak_ptr/comparison/cmp_neg.cc
+++ b/libstdc++-v3/testsuite/20_util/weak_ptr/comparison/cmp_neg.cc
@@ -45,15 +45,15 @@ main()
// { dg-warning "note" "" { target *-*-* } 370 }
// { dg-warning "note" "" { target *-*-* } 365 }
// { dg-warning "note" "" { target *-*-* } 357 }
-// { dg-warning "note" "" { target *-*-* } 1099 }
-// { dg-warning "note" "" { target *-*-* } 1094 }
-// { dg-warning "note" "" { target *-*-* } 1086 }
+// { dg-warning "note" "" { target *-*-* } 1103 }
+// { dg-warning "note" "" { target *-*-* } 1098 }
+// { dg-warning "note" "" { target *-*-* } 1090 }
// { dg-warning "note" "" { target *-*-* } 485 }
// { dg-warning "note" "" { target *-*-* } 479 }
// { dg-warning "note" "" { target *-*-* } 469 }
-// { dg-warning "note" "" { target *-*-* } 587 }
+// { dg-warning "note" "" { target *-*-* } 637 }
// { dg-warning "note" "" { target *-*-* } 1056 }
// { dg-warning "note" "" { target *-*-* } 1050 }
// { dg-warning "note" "" { target *-*-* } 342 }
// { dg-warning "note" "" { target *-*-* } 292 }
-// { dg-warning "note" "" { target *-*-* } 207 }
+// { dg-warning "note" "" { target *-*-* } 212 }
diff --git a/libstdc++-v3/testsuite/23_containers/array/requirements/get.cc b/libstdc++-v3/testsuite/23_containers/array/requirements/get.cc
new file mode 100644
index 00000000000..1919aade3b0
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/array/requirements/get.cc
@@ -0,0 +1,31 @@
+// { dg-do compile }
+// { dg-options "-std=gnu++0x" }
+
+// 2011-05-16 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 <array>
+
+void test01()
+{
+ std::array<int, 2> a;
+
+ int&& aone __attribute__((unused)) = std::get<0>(std::move(a));
+ int&& atwo __attribute__((unused)) = std::get<1>(std::move(a));
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/reverse/moveable.cc b/libstdc++-v3/testsuite/25_algorithms/reverse/moveable.cc
index 9a871db5f48..ec6d241ac5d 100644
--- a/libstdc++-v3/testsuite/25_algorithms/reverse/moveable.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/reverse/moveable.cc
@@ -1,7 +1,7 @@
// { dg-do compile }
// { dg-options "-std=gnu++0x" }
-// Copyright (C) 2005, 2007, 2009 Free Software Foundation, Inc.
+// Copyright (C) 2005, 2007, 2009, 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
@@ -27,11 +27,11 @@
using __gnu_test::bidirectional_iterator_wrapper;
-class X
-{
- X();
- X(const X&);
- void operator=(const X&);
+struct X
+{
+ X() = delete;
+ X(const X&) = delete;
+ void operator=(const X&) = delete;
};
void
diff --git a/libstdc++-v3/testsuite/25_algorithms/swap_ranges/moveable.cc b/libstdc++-v3/testsuite/25_algorithms/swap_ranges/moveable.cc
index 5377ea838f1..78750f29b40 100644
--- a/libstdc++-v3/testsuite/25_algorithms/swap_ranges/moveable.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/swap_ranges/moveable.cc
@@ -1,7 +1,7 @@
// { dg-do compile }
// { dg-options "-std=gnu++0x" }
-// Copyright (C) 2005, 2007, 2009 Free Software Foundation, Inc.
+// Copyright (C) 2005, 2007, 2009, 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
@@ -27,11 +27,11 @@
using __gnu_test::forward_iterator_wrapper;
-class X
+struct X
{
- X();
- X(const X&);
- void operator=(const X&);
+ X() = delete;
+ X(const X&) = delete;
+ void operator=(const X&) = delete;
};
void
diff --git a/libstdc++-v3/testsuite/26_numerics/headers/cmath/overloads_c++0x_neg.cc b/libstdc++-v3/testsuite/26_numerics/headers/cmath/overloads_c++0x_neg.cc
index 2d8862ead15..0433ee3f81a 100644
--- a/libstdc++-v3/testsuite/26_numerics/headers/cmath/overloads_c++0x_neg.cc
+++ b/libstdc++-v3/testsuite/26_numerics/headers/cmath/overloads_c++0x_neg.cc
@@ -1,5 +1,6 @@
-// { dg-options "-std=gnu++0x" }
// { dg-do compile }
+// { dg-options "-std=gnu++0x" }
+// { dg-require-cmath "" }
// Copyright (C) 2011 Free Software Foundation, Inc.
//
@@ -22,8 +23,6 @@
// libstdc++/48933
-#ifdef _GLIBCXX_USE_C99_MATH_TR1
-
struct Foo { };
template Foo std::atan2<Foo, Foo>(Foo, Foo); // { dg-error "not match" }
@@ -61,5 +60,3 @@ template Foo std::scalbln<Foo>(Foo, long); // { dg-error "not match" }
template Foo std::scalbn<Foo>(Foo, int); // { dg-error "not match" }
template Foo std::tgamma<Foo>(Foo); // { dg-error "not match" }
template Foo std::trunc<Foo>(Foo); // { dg-error "not match" }
-
-#endif
diff --git a/libstdc++-v3/testsuite/ext/profile/mutex_extensions_neg.cc b/libstdc++-v3/testsuite/ext/profile/mutex_extensions_neg.cc
index c0b1f688ab6..632dc190adc 100644
--- a/libstdc++-v3/testsuite/ext/profile/mutex_extensions_neg.cc
+++ b/libstdc++-v3/testsuite/ext/profile/mutex_extensions_neg.cc
@@ -25,4 +25,4 @@
#include <vector>
-// { dg-error "multiple inlined namespaces" "" { target *-*-* } 241 }
+// { dg-error "multiple inlined namespaces" "" { target *-*-* } 252 }
diff --git a/libstdc++-v3/testsuite/tr1/8_c_compatibility/cmath/overloads_neg.cc b/libstdc++-v3/testsuite/tr1/8_c_compatibility/cmath/overloads_neg.cc
index 174a81dc5f9..ae83a00b03d 100644
--- a/libstdc++-v3/testsuite/tr1/8_c_compatibility/cmath/overloads_neg.cc
+++ b/libstdc++-v3/testsuite/tr1/8_c_compatibility/cmath/overloads_neg.cc
@@ -1,4 +1,5 @@
// { dg-do compile }
+// { dg-require-cmath "" }
// Copyright (C) 2011 Free Software Foundation, Inc.
//
@@ -23,8 +24,6 @@
// libstdc++/48933
-#ifdef _GLIBCXX_USE_C99_MATH_TR1
-
struct Foo { };
template Foo std::tr1::atan2<Foo, Foo>(Foo, Foo); // { dg-error "not match" }
@@ -62,5 +61,3 @@ template Foo std::tr1::scalbln<Foo>(Foo, long); // { dg-error "not match" }
template Foo std::tr1::scalbn<Foo>(Foo, int); // { dg-error "not match" }
template Foo std::tr1::tgamma<Foo>(Foo); // { dg-error "not match" }
template Foo std::tr1::trunc<Foo>(Foo); // { dg-error "not match" }
-
-#endif
diff --git a/libstdc++-v3/testsuite/util/testsuite_allocator.h b/libstdc++-v3/testsuite/util/testsuite_allocator.h
index a534d85845d..73622f1a7a1 100644
--- a/libstdc++-v3/testsuite/util/testsuite_allocator.h
+++ b/libstdc++-v3/testsuite/util/testsuite_allocator.h
@@ -327,10 +327,19 @@ namespace __gnu_test
void
destroy(pointer p) { p->~Tp(); }
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ // Not copy assignable...
+ uneq_allocator&
+ operator=(const uneq_allocator&) = delete;
+#endif
+
private:
+
+#ifndef __GXX_EXPERIMENTAL_CXX0X__
// Not assignable...
uneq_allocator&
operator=(const uneq_allocator&);
+#endif
// ... yet swappable!
friend inline void
diff --git a/libstdc++-v3/testsuite/util/testsuite_tr1.h b/libstdc++-v3/testsuite/util/testsuite_tr1.h
index 9265bc41216..842d4453897 100644
--- a/libstdc++-v3/testsuite/util/testsuite_tr1.h
+++ b/libstdc++-v3/testsuite/util/testsuite_tr1.h
@@ -204,6 +204,78 @@ namespace __gnu_test
{
ExceptMoveConsClass(ExceptMoveConsClass&&) noexcept(false);
};
+
+ struct NoexceptCopyAssignClass
+ {
+ NoexceptCopyAssignClass&
+ operator=(const NoexceptCopyAssignClass&) noexcept(true);
+ };
+
+ struct ExceptCopyAssignClass
+ {
+ ExceptCopyAssignClass&
+ operator=(const ExceptCopyAssignClass&) noexcept(false);
+ };
+
+ struct NoexceptMoveAssignClass
+ {
+ NoexceptMoveAssignClass&
+ operator=(NoexceptMoveAssignClass&&) noexcept(true);
+ };
+
+ struct ExceptMoveAssignClass
+ {
+ ExceptMoveAssignClass&
+ operator=(ExceptMoveAssignClass&&) noexcept(false);
+ };
+
+ struct DeletedCopyAssignClass
+ {
+ DeletedCopyAssignClass&
+ operator=(const DeletedCopyAssignClass&) = delete;
+ };
+
+ struct DeletedMoveAssignClass
+ {
+ DeletedMoveAssignClass&
+ operator=(DeletedMoveAssignClass&&) = delete;
+ };
+
+ struct NoexceptMoveConsNoexceptMoveAssignClass
+ {
+ NoexceptMoveConsNoexceptMoveAssignClass
+ (NoexceptMoveConsNoexceptMoveAssignClass&&) noexcept(true);
+
+ NoexceptMoveConsNoexceptMoveAssignClass&
+ operator=(NoexceptMoveConsNoexceptMoveAssignClass&&) noexcept(true);
+ };
+
+ struct ExceptMoveConsNoexceptMoveAssignClass
+ {
+ ExceptMoveConsNoexceptMoveAssignClass
+ (ExceptMoveConsNoexceptMoveAssignClass&&) noexcept(false);
+
+ ExceptMoveConsNoexceptMoveAssignClass&
+ operator=(ExceptMoveConsNoexceptMoveAssignClass&&) noexcept(true);
+ };
+
+ struct NoexceptMoveConsExceptMoveAssignClass
+ {
+ NoexceptMoveConsExceptMoveAssignClass
+ (NoexceptMoveConsExceptMoveAssignClass&&) noexcept(true);
+
+ NoexceptMoveConsExceptMoveAssignClass&
+ operator=(NoexceptMoveConsExceptMoveAssignClass&&) noexcept(false);
+ };
+
+ struct ExceptMoveConsExceptMoveAssignClass
+ {
+ ExceptMoveConsExceptMoveAssignClass
+ (ExceptMoveConsExceptMoveAssignClass&&) noexcept(false);
+
+ ExceptMoveConsExceptMoveAssignClass&
+ operator=(ExceptMoveConsExceptMoveAssignClass&&) noexcept(false);
+ };
#endif
struct NType // neither trivial nor standard-layout
@@ -450,6 +522,180 @@ namespace __gnu_test
UnusualCopy(UnusualCopy&);
};
}
+
+ namespace assign
+ {
+ struct Empty {};
+
+ struct B { int i; B(){} };
+ struct D : B {};
+
+ enum E { ee1 };
+ enum E2 { ee2 };
+ enum class SE { e1 };
+ enum class SE2 { e2 };
+
+ enum OpE : int;
+ enum class OpSE : bool;
+
+ union U { int i; Empty b; };
+
+ union UAssignAll
+ {
+ bool b;
+ char c;
+ template<class T>
+ void operator=(T&&);
+ };
+
+ union UDelAssignAll
+ {
+ bool b;
+ char c;
+ template<class T>
+ void operator=(T&&) = delete;
+ };
+
+ struct Abstract
+ {
+ virtual ~Abstract() = 0;
+ };
+
+ struct AbstractDelDtor
+ {
+ ~AbstractDelDtor() = delete;
+ virtual void foo() = 0;
+ };
+
+ struct Ukn;
+
+ template<class To>
+ struct ImplicitTo
+ {
+ operator To();
+ };
+
+ template<class To>
+ struct ExplicitTo
+ {
+ explicit operator To();
+ };
+
+ template<class To>
+ struct DelImplicitTo
+ {
+ operator To() = delete;
+ };
+
+ template<class To>
+ struct DelExplicitTo
+ {
+ explicit operator To() = delete;
+ };
+
+ struct Ellipsis
+ {
+ Ellipsis(...){}
+ };
+
+ struct DelEllipsis
+ {
+ DelEllipsis(...) = delete;
+ };
+
+ struct Any
+ {
+ template<class T>
+ Any(T&&){}
+ };
+
+ struct nAny
+ {
+ template<class... T>
+ nAny(T&&...){}
+ };
+
+ struct DelnAny
+ {
+ template<class... T>
+ DelnAny(T&&...) = delete;
+ };
+
+ template<class... Args>
+ struct FromArgs
+ {
+ FromArgs(Args...);
+ };
+
+ template<class... Args>
+ struct DelFromArgs
+ {
+ DelFromArgs(Args...) = delete;
+ };
+
+ struct DelDef
+ {
+ DelDef() = delete;
+ };
+
+ struct DelCopy
+ {
+ DelCopy(const DelCopy&) = delete;
+ };
+
+ struct DelDtor
+ {
+ DelDtor() = default;
+ DelDtor(const DelDtor&) = default;
+ DelDtor(DelDtor&&) = default;
+ DelDtor(int);
+ DelDtor(int, B, U);
+ ~DelDtor() = delete;
+ };
+
+ struct Nontrivial
+ {
+ Nontrivial();
+ Nontrivial(const Nontrivial&);
+ Nontrivial& operator=(const Nontrivial&);
+ ~Nontrivial();
+ };
+
+ union NontrivialUnion
+ {
+ int i;
+ Nontrivial n;
+ };
+
+ struct UnusualCopy
+ {
+ UnusualCopy(UnusualCopy&);
+ };
+
+ struct AnyAssign
+ {
+ template<class T>
+ void operator=(T&&);
+ };
+
+ struct DelAnyAssign
+ {
+ template<class T>
+ void operator=(T&&) = delete;
+ };
+
+ struct DelCopyAssign
+ {
+ DelCopyAssign& operator=(const DelCopyAssign&) = delete;
+ DelCopyAssign& operator=(DelCopyAssign&&) = default;
+ };
+
+ struct MO
+ {
+ MO(MO&&) = default;
+ MO& operator=(MO&&) = default;
+ };
+ }
#endif
} // namespace __gnu_test