Index: include/__tuple =================================================================== --- include/__tuple +++ include/__tuple @@ -475,6 +475,8 @@ template static constexpr bool __enable_implicit() { return false; } template + using __enable_implicit_t = false_type; + template static constexpr bool __enable_assign() { return false; } }; #endif Index: include/tuple =================================================================== --- include/tuple +++ include/tuple @@ -537,6 +537,9 @@ sizeof...(_Tp)>::type >::value; } + template + struct __enable_implicit_t : integral_constant()> {}; + }; template ::value - >::template __enable_implicit<_Up...>(), + >::template __enable_implicit_t<_Up...>::value, bool >::type = false > Index: test/std/utilities/tuple/tuple.tuple/tuple.cnstr/PR29123_implicit_constructor_sfinae.pass.cpp =================================================================== --- /dev/null +++ test/std/utilities/tuple/tuple.tuple/tuple.cnstr/PR29123_implicit_constructor_sfinae.pass.cpp @@ -0,0 +1,21 @@ +// repro.cpp +// this is minimized code from folly library +#include + +template +struct Optional { + Optional() = default; + // implicit + Optional(const Value&) {} +}; + +struct dynamic { + // implicit + template dynamic(T) {} +}; + +Optional> get() { return {}; } + +int main() { + auto x = get(); +}