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