Sign in
gnu
/
gcc
/
a6d3012b274f38b20e2a57162106f625746af6c6
/
.
/
gcc
/
testsuite
/
g++.dg
/
cpp1y
/
constexpr-99859-2.C
blob: a249f4746664c54b7cc5c7faebfc36e98564ec6c [
file
] [
log
] [
blame
]
// PR c++/99859
// { dg-do compile { target c++14 } }
struct
A
{
int
i
;
constexpr
int
f
()
{
return
i
;
}
constexpr
A
()
:
i
(
0
)
{
i
=
f
();
i
=
1
;
i
=
f
();
}
};
constexpr
A a
=
A
();
static_assert
(
a
.
i
==
1
,
""
);