Sign in
gnu
/
gcc
/
ab810952eb7c061e37054ddd1dfe0aa033365131
/
.
/
gcc
/
testsuite
/
g++.dg
/
cpp1z
/
constexpr-lambda10.C
blob: d13053a9c4e2a4dd8e484163501605bdbe018b63 [
file
] [
log
] [
blame
]
// Testcase from P0170R1
// { dg-do compile { target c++17 } }
void
g
()
{
const
int
n
=
0
;
[=]
{
constexpr
int
i
=
n
;
// OK, 'n' is not odr-used and not captured here.
constexpr
int
j
=
*&
n
;
// { dg-error "" } '&n' would be an odr-use of 'n'.
};
}