Debian Codegraph @

gcc/testsuite/g++.dg/cpp1y/lambda-init6.C

raw
1 // Test that captures are not named in the closure type.
2 // { dg-do compile { target c++14 } }
3
4 int main()
5 {
6 int i;
7 auto lam = [i,j=42]{};
8 lam.j; // { dg-error "no member" }
9 lam.i; // { dg-error "no member" }
10 }