Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/g++.dg/cpp0x/forw_enum11.C @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children |
rev | line source |
---|---|
111 | 1 // { dg-do compile { target c++11 } } |
2 | |
3 enum { A = 1 }; | |
4 struct T | |
5 { | |
6 int i1, i2, i3, i4, i5, i6, i7; | |
7 enum E2 : int; | |
8 | |
9 void f(); | |
10 }; | |
11 | |
12 enum T::E2 : int { A1 = A, A2 = 23 }; | |
13 | |
14 static_assert(int(T::A1) == 1, "error"); | |
15 static_assert(int(T::A2) == 23, "error"); | |
16 | |
17 void T::f() | |
18 { | |
19 static_assert(int(T::A1) == 1, "error"); | |
20 static_assert(int(T::A2) == 23, "error"); | |
21 static_assert(int(A1) == 1, "error"); | |
22 static_assert(int(A2) == 23, "error"); | |
23 } |