This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [v3 PATCH] Make the default constructors of tuple and pair conditionally explicit.


On 2 November 2015 at 23:07, Paolo Carlini <paolo.carlini@oracle.com> wrote:
> Great, thanks a lot. Thinking more about this detail, I wonder if we should
> therefore apply the below too? Anything I'm missing?

Tested again on Linux-PPC64. Ok for trunk?

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.

Attachment: conditional-explicit-default-ctors-pair-tuple5.diff
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]