Index: include/tuple =================================================================== --- include/tuple +++ include/tuple @@ -523,6 +523,16 @@ _LIBCPP_CONSTEXPR tuple() _NOEXCEPT_(__all::value...>::value) {} + template , _Dummy>::value...>::value + >::type> + _LIBCPP_INLINE_VISIBILITY + tuple(allocator_arg_t, _Alloc const& __a) + : base_(allocator_arg_t(), __a, + __tuple_indices<>(), __tuple_types<>(), + typename __make_tuple_indices::type(), + __tuple_types<_Tp...>()) {} + _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 explicit tuple(const _Tp& ... __t) _NOEXCEPT_((__all::value...>::value)) : base_(typename __make_tuple_indices::type(), @@ -631,21 +641,8 @@ template , - typename __make_tuple_types::type - >::value && - __all_default_constructible< - typename __make_tuple_types::type - >::value + sizeof...(_Up) == sizeof...(_Tp) && + __tuple_convertible, tuple>::value >::type > _LIBCPP_INLINE_VISIBILITY Index: test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_UTypes.pass.cpp =================================================================== --- test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_UTypes.pass.cpp +++ test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_UTypes.pass.cpp @@ -30,7 +30,7 @@ // are not explicitly initialized are not all default constructible. // Otherwise, std::is_constructible would return true but instantiating // the constructor would fail. -void test_default_constructible_extension_sfinae() +void test_default_constructible_sfinae() { { typedef std::tuple Tuple; @@ -120,22 +120,7 @@ assert(alloc_last::allocator_constructed); assert(std::get<2>(t) == alloc_last(3)); } - // extensions - { - std::tuple t(std::allocator_arg, A1(), - 0, 1); - assert(std::get<0>(t) == 0); - assert(std::get<1>(t) == 1); - assert(std::get<2>(t) == MoveOnly()); - } - { - std::tuple t(std::allocator_arg, A1(), - 0); - assert(std::get<0>(t) == 0); - assert(std::get<1>(t) == MoveOnly()); - assert(std::get<2>(t) == MoveOnly()); - } // Check that SFINAE is properly applied with the default reduced arity // constructor extensions. - test_default_constructible_extension_sfinae(); + test_default_constructible_sfinae(); }