PR c++/81917 - ICE with void_t and partial specialization.
[official-gcc.git] / gcc / testsuite / g++.dg / template / sfinae23.C
blob53ed51dd52f5d126d0323b39d118769331b0959c
1 // PR c++/44969
2 // { dg-do compile { target c++11 } }
4 template<typename Tp, typename... Args>
5   class mini_is_constructible
6   {
7     typedef char one;
8     typedef struct { char arr[2]; } two;
10     template<typename Tp1, typename... Args1>
11       static decltype(Tp1(Args1()...), one())
12       test(int);
14     template<typename, typename...>
15       static two test(...);
17   public:
18     static const bool value = sizeof(test<Tp, Args...>(0)) == 1;
19   };
21 class A { };
23 int Test[mini_is_constructible<int, A, A>::value ? -1 : 1];