PR c++/81917 - ICE with void_t and partial specialization.
[official-gcc.git] / gcc / testsuite / g++.dg / template / pr66850.C
blob31c129086a0c183e8ba50208416b142dc91f4a65
1 // PR c++/66850
2 // Each namespace contains an otherwise standalone test case, none of which
3 // should cause an ICE.
5 namespace X {
6   template <template <typename U, U> class> struct Sort;
8   template <template <typename U, U> class Comparator>
9   struct Sort
10   {
11     template <int I>
12     struct less_than
13     {
14       Comparator<int, I> a;
15     };
16   };
19 namespace Y {
20   template <typename C, C> struct integral_constant {};
22   template <typename T, template <typename U, U> class> struct Sort;
24   template <template <typename U, U> class Comparator>
25   struct Sort<int, Comparator>
26   {
27       template <int I> struct less_than:
28           integral_constant<bool, Comparator<int, I>::value> {};
29   };
32 namespace Z {
33   template <typename T, template <typename U, U> class> struct Sort;
35   template <template <typename U, U> class Comparator>
36   struct Sort<int, Comparator>
37   {
38     template <int I>
39     struct less_than
40     {
41       Comparator<int, I> a;
42     };
43   };