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

enum class E { e = 10 };
enum E2 { e2 = 10 };

struct C {
  int arr[E::e];    // { dg-error "non-integral type" }
  int arr2[E2::e2]; // OK
  int i: E::e;	    // { dg-error "non-integral type" }
  int i2: E2::e2;   // OK
};