Index: include/tuple =================================================================== --- include/tuple +++ include/tuple @@ -635,7 +635,8 @@ >::value && __all_default_constructible< typename __make_tuple_types::type >::value Index: test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_UTypes_PR24779.pass.cpp =================================================================== --- /dev/null +++ test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_UTypes_PR24779.pass.cpp @@ -0,0 +1,40 @@ +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +// + +// template class tuple; + +// template +// tuple(allocator_arg_t, const Alloc& a, UTypes&&...); + +// UNSUPPORTED: c++98, c++03 + +// Check that this constructor does not evaluate +// std::is_default_constructible for any T in Types. + +#include +#include + +template +struct BadDefaultCtor { + constexpr BadDefaultCtor() { + static_assert(!std::is_same::value, ""); + } + + explicit BadDefaultCtor(int) {} +}; + +void DeleteFn(int*) {} + +int main() { + typedef BadDefaultCtor<> Type; + typedef std::tuple Tuple; + Tuple t(Type(0), Type(0)); +}