Debian Codegraph @

gcc/testsuite/g++.dg/cpp2a/lambda-generic6.C

raw
1 // P0428R2
2 // { dg-do compile { target c++14 } }
3
4 struct S { int s; };
5
6 auto x =
7 #if __cpp_generic_lambdas >= 201707
8 []<class T = S>(T &&t) { return t.s; } ({ 2 });
9 #else
10 [](auto &&t) { return t.s; } (S { 2 });
11 #endif