Debian Codegraph @

gcc/testsuite/g++.dg/cpp0x/enum22.C

raw
1 // PR c++/56155
2 // { dg-do compile { target c++11 } }
3
4 enum e_ : unsigned char { Z_, E_=sizeof(Z_) };
5 static_assert( E_ == 1, "E_ should be 1");
6
7 template <class T>
8 struct A {
9 enum e_ : unsigned char { Z_, E_=sizeof(Z_) };
10 };
11
12 static_assert ( A<double>::E_ == 1, "E_ should be 1");