PR c++/81917 - ICE with void_t and partial specialization.
[official-gcc.git] / gcc / testsuite / g++.dg / template / crash2.C
blob47c95ab067fd90f1b0b8f33a106a450c061b32a1
1 // { dg-options "" }
3 template <class EnumType>
4 class A
6 public:
7   static const EnumType size = max; // { dg-error "" }
8   int table[size]; // { dg-error "constant" }
9 };
10 template <class EnumType>
11 const EnumType A<EnumType>::size;
14 namespace N
16 enum E { max = 5 };
18 struct B
20   A<E> a;
25 int
26 main()
28   N::B b;
30   return 0;