Sign in
gnu
/
gcc
/
a6d3012b274f38b20e2a57162106f625746af6c6
/
.
/
gcc
/
testsuite
/
g++.dg
/
cpp1y
/
lambda-init1.C
blob: e9105fc12978a441042dd912b363bb4b5ec31f4b [
file
] [
log
] [
blame
]
// N3648: capture init
// { dg-options "-w" }
// { dg-do run { target c++14 } }
int
main
()
{
int
x
=
41
;
auto
r
=
[
x
=
x
+
1
]{
return
x
;
}();
if
(
r
!=
42
)
__builtin_abort
();
static
auto
*
p
=
&
r
;
[&
x
=
r
]{
if
(&
x
!=
p
)
__builtin_abort
();
}();
}