1 // { dg-do compile { target c++11 } }
17 enum class S::T::E1 { A1 = A, B1 = B, C1 };
18 enum S::T::E2 : int { A1 = A, B1 = B, C1 };
20 static_assert(int(S::T::E1::A1) == 1, "error");
21 static_assert(int(S::T::E1::B1) == 102, "error");
22 static_assert(int(S::T::E1::C1) == 103, "error");
24 static_assert(int(S::T::E2::A1) == 1, "error");
25 static_assert(int(S::T::E2::B1) == 102, "error");
26 static_assert(int(S::T::E2::C1) == 103, "error");
27 static_assert(int(S::T::A1) == 1, "error");
28 static_assert(int(S::T::B1) == 102, "error");
29 static_assert(int(S::T::C1) == 103, "error");
37 enum { A = 1, B = 2 };
47 enum class S::T::E1 { A1 = A, B1 = B, C1 };
48 enum S::T::E2 : int { A1 = A, B1 = B, C1 };
50 static_assert(int(S::T::E1::A1) == 1, "error");
51 static_assert(int(S::T::E1::B1) == 102, "error");
52 static_assert(int(S::T::E1::C1) == 103, "error");
54 static_assert(int(S::T::E2::A1) == 1, "error");
55 static_assert(int(S::T::E2::B1) == 102, "error");
56 static_assert(int(S::T::E2::C1) == 103, "error");
57 static_assert(int(S::T::A1) == 1, "error");
58 static_assert(int(S::T::B1) == 102, "error");
59 static_assert(int(S::T::C1) == 103, "error");