Sign in
gnu
/
gcc
/
refs/heads/devel/c++-contracts
/
.
/
gcc
/
testsuite
/
g++.dg
/
cpp1y
/
lambda-init2.C
blob: e4f31cfa2da248d04e886e90226a0dc87c10cba9 [
file
] [
log
] [
blame
]
// N3648: redundancy and capture init
// { dg-do compile { target c++14 } }
int
main
()
{
int
x
=
42
;
[=,
x
]{};
// { dg-error "redundant" }
[=,&
x
]{};
[&,&
x
]{};
// { dg-error "redundant" }
[&,
x
]{};
[=,
x
=
24
]{};
[&,&
r
=
x
]{};
}