Index: include/tuple =================================================================== --- include/tuple +++ include/tuple @@ -577,34 +577,40 @@ _VSTD::forward<_Up>(__u)...) {} template , - typename __make_tuple_types::type - >::value && - !__tuple_convertible - < - tuple<_Up...>, - typename __make_tuple_types::type - >::value && - __all_default_constructible< - typename __make_tuple_types, + is_convertible<_Up..., tuple> + > + >, + integral_constant, + __tuple_constructible< + tuple<_Up...>, + typename __make_tuple_types::type - >::value, - bool - >::type =false - > + sizeof...(_Up) : + sizeof...(_Tp)>::type + >, + __lazy_not< + __tuple_convertible< + tuple<_Up...>, + typename __make_tuple_types::type + > + >, + __all_default_constructible< + typename __make_tuple_types::type + > + >::value, + bool + >::type =false > _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 explicit tuple(_Up&&... __u) Index: test/std/utilities/tuple/tuple.tuple/tuple.cnstr/convert_copy_UTypes.pass.cpp =================================================================== --- test/std/utilities/tuple/tuple.tuple/tuple.cnstr/convert_copy_UTypes.pass.cpp +++ test/std/utilities/tuple/tuple.tuple/tuple.cnstr/convert_copy_UTypes.pass.cpp @@ -0,0 +1,33 @@ +//===----------------------------------------------------------------------===// +// +// 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 +// explicit tuple(UTypes&&... u); + +// PR23256: SFINAE on tuple(UTypes&&... u) erroneously calls UTypes(tuple) ctor. + +// UNSUPPORTED: c++98, c++03 + +#include + +struct A { + int value_; + + template + explicit constexpr A(T value) + : value_(static_cast(value)) {} +}; + +static_assert(std::is_trivially_copy_constructible>::value, "zz"); + +int main() {}