1// { dg-options "" }
2
3template <class EnumType>
4class A
5{
6public:
7  static const EnumType size = max; // { dg-error "" }
8  int table[size]; // { dg-error "constant" }
9};
10template <class EnumType>
11const EnumType A<EnumType>::size;
12
13
14namespace N
15{
16enum E { max = 5 };
17
18struct B
19{
20  A<E> a;
21};
22
23}
24
25int
26main()
27{
28  N::B b;
29
30  return 0;
31}
32