blob: 8cabc038fcea758233b6ae5ed7b7d499af3e2122 [file] [log] [blame]
// { dg-do compile { target c++11 } }
enum { A = 1 };
struct T
{
int i1, i2, i3, i4, i5, i6, i7;
enum E2 : int;
void f();
};
enum T::E2 : int { A1 = A, A2 = 23 };
static_assert(int(T::A1) == 1, "error");
static_assert(int(T::A2) == 23, "error");
void T::f()
{
static_assert(int(T::A1) == 1, "error");
static_assert(int(T::A2) == 23, "error");
static_assert(int(A1) == 1, "error");
static_assert(int(A2) == 23, "error");
}