blob: 2b82bca457834a6092fed38b9b6a232336346f9e [file] [log] [blame]
// Test that simple captures are not named in the closure type, but
// initialized captures are named.
// { dg-do compile { target c++1y } }
int main()
{
int i;
auto lam = [i,j=42]{};
lam.j;
lam.j.foo; // { dg-error "::j" }
lam.i; // { dg-error "no member" }
}