☰
Debian Codegraph
@
15:15.3.rel1-2
15:15.3.rel1-1
/
/
gcc
/
testsuite
/
g++.dg
/
cpp0x
/
constexpr-union8.C
☽
☼
gcc/testsuite/g++.dg/cpp0x/constexpr-union8.C
code
plain
raw
1
// PR c++/114709
2
// { dg-do compile { target c++11 } }
3
4
struct T1 { int a, b; };
5
struct T2 { int c; double d; };
6
union U { T1 t1; T2 t2; };
7
8
constexpr int v = U{{1,2}}.t2.*&T2::c; // { dg-error "accessing 'U::t2'" }