This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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] |
On 2 November 2015 at 17:19, Paolo Carlini <paolo.carlini@oracle.com> wrote: > Anyway, so far the only detail which makes me a little nervous is the > following: > > + template <typename _Tp> > + struct __is_implicitly_default_constructible > + : public integral_constant<bool, > + (is_default_constructible<_Tp>::value > + && > __is_implicitly_default_constructible_safe<_Tp>::value)> > > > I think we want to use __and_ (note that there isn't a single logical && in > the whole type_traits, outside macros). Yep. New patch, tested on Linux-PPC64. Minor typo fixes for the changelog. Ok for trunk? 2015-11-01 Ville Voutilainen <ville.voutilainen@gmail.com> Make the default constructors of tuple and pair conditionally explicit. * 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-tuple3.diff
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |