Make the default constructors of tuple and pair conditionally explicit.
authorVille Voutilainen <ville.voutilainen@gmail.com>
Tue, 3 Nov 2015 08:41:40 +0000 (10:41 +0200)
committerVille Voutilainen <ville@gcc.gnu.org>
Tue, 3 Nov 2015 08:41:40 +0000 (10:41 +0200)
commitf76321937378f925d6a4be06ebb2b4b46036edee
tree9297e23ae61b087378aeec93b9b67501f63e547b
parentbbe741d0e2c6d5a7247a2a724699f7ba20cb6ad9
Make the default constructors of tuple and pair conditionally explicit.

2015-11-03  Ville Voutilainen  <ville.voutilainen@gmail.com>

Make the default constructors of tuple and pair conditionally explicit.
* include/std/type_traits (is_unsigned, __is_array_unknown_bounds,
__is_default_constructible_atom, __is_default_constructible_safe,
__is_direct_constructible_new_safe, __is_direct_constructible_ref_cast,
__is_nt_default_constructible_impl, is_nothrow_default_constructible,
is_nothrow_constructible, is_nothrow_assignable,
is_trivially_constructible, is_trivially_copy_constructible,
is_trivially_move_constructible, is_trivially_assignable,
is_trivially_copy_assignable, is_trivially_move_assignable,
is_trivially_destructible): Simplify.
* include/std/type_traits (
__do_is_implicitly_default_constructible_impl,
__is_implicitly_default_constructible_impl,
__is_implicitly_default_constructible_safe,
__is_implicitly_default_constructible): New.
* include/bits/stl_pair.h (pair::pair()): Use it.
* include/std/tuple (tuple<_T1, _T2>::tuple): Use it.
* include/std/tuple (_ImplicitlyDefaultConstructibleTuple): New.
* include/std/tuple (tuple<_Types...>::tuple()): Use it.
* testsuite/20_util/declval/requirements/1_neg.cc: Adjust.
* testsuite/20_util/is_implicitly_default_constructible/requirements/explicit_instantiation.cc: New.
* testsuite/20_util/is_implicitly_default_constructible/requirements/typedefs.cc: Likewise.
* testsuite/20_util/is_implicitly_default_constructible/value.cc: Likewise.
* testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Adjust.
* testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Likewise.
* testsuite/20_util/pair/cons/explicit_construct.cc: Likewise.
* testsuite/20_util/tuple/cons/explicit_construct.cc: Likewise.

From-SVN: r229699
12 files changed:
libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/stl_pair.h
libstdc++-v3/include/std/tuple
libstdc++-v3/include/std/type_traits
libstdc++-v3/testsuite/20_util/declval/requirements/1_neg.cc
libstdc++-v3/testsuite/20_util/is_implicitly_default_constructible/requirements/explicit_instantiation.cc [new file with mode: 0644]
libstdc++-v3/testsuite/20_util/is_implicitly_default_constructible/requirements/typedefs.cc [new file with mode: 0644]
libstdc++-v3/testsuite/20_util/is_implicitly_default_constructible/value.cc [new file with mode: 0644]
libstdc++-v3/testsuite/20_util/make_signed/requirements/typedefs_neg.cc
libstdc++-v3/testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc
libstdc++-v3/testsuite/20_util/pair/cons/explicit_construct.cc
libstdc++-v3/testsuite/20_util/tuple/cons/explicit_construct.cc