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