Sign in
gnu
/
gcc
/
ab810952eb7c061e37054ddd1dfe0aa033365131
/
.
/
gcc
/
testsuite
/
g++.dg
/
cpp0x
/
nsdmi2.C
blob: 31a638f2d18ea292a22a8e8feb3d3053d57dd4e0 [
file
] [
log
] [
blame
]
// { dg-do compile { target c++11 } }
struct
A
{
int
i
;
constexpr
A
(
int
i
):
i
(
i
)
{}
};
struct
B
{
A a1
=
1
;
A a2
{
2
};
A a3
=
{
3
};
};
#define
SA
(
X
)
static_assert
(
X
,#
X
)
constexpr
B b
;
SA
(
b
.
a1
.
i
==
1
);
SA
(
b
.
a2
.
i
==
2
);
SA
(
b
.
a3
.
i
==
3
);