Sign in
gnu
/
gcc
/
cd2fd5facb5e1882d3f338ed456ae9536f7c0593
/
.
/
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
);