1 // PR c++/67164 2 // { dg-do compile { target c++11 } } 3 4 #include <type_traits> 5 6 namespace detail { 7 template <bool ...b> 8 struct fast_and 9 : std::is_same<fast_and<b...>, fast_and<(b, true)...>> 10 { }; 11 } 12 13 template <typename ...Xn> 14 struct tuple { tupletuple15 tuple() { } 16 17 template <typename ...Yn, typename = typename std::enable_if< 18 detail::fast_and<std::is_constructible<Xn, Yn&&>::value...>::value 19 >::type> tupletuple20 tuple(Yn&& ...yn) { } 21 22 template <typename ...Yn, typename = typename std::enable_if< 23 detail::fast_and<std::is_constructible<Xn, Yn const&>::value...>::value 24 >::type> tupletuple25 tuple(tuple<Yn...> const& other) { } 26 }; 27 28 tuple<tuple<>> t{}; 29 tuple<tuple<>> copy = t; 30