aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/enum22.C
blob: e87a31ce6d520028878e7292cf268f20fa2413d5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// PR c++/56155
// { dg-do compile { target c++11 } }

enum e_ : unsigned char { Z_, E_=sizeof(Z_) };
static_assert( E_ == 1, "E_ should be 1");

template <class T>
struct A {
  enum e_ : unsigned char { Z_, E_=sizeof(Z_) };
};

static_assert ( A<double>::E_ == 1, "E_ should be 1");