Implement P0315R4, Lambdas in unevaluated contexts.
[official-gcc.git] / gcc / testsuite / g++.dg / cpp2a / lambda-uneval1.C
blob8a1703304ab82a1612aef075759c1114828f45f7
1 // { dg-do compile { target c++2a } }
3 typedef decltype([]{}) C; // the closure type has no name for linkage purposes
5 // { dg-final { scan-assembler-not "globl\[ \t]*_Z1f" } }
6 // { dg-final { scan-assembler-not "_Z1f1C" } }
7 void f(C) {}
9 int main()
11   C c;
12   c();
13   f(c);