aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp2a/lambda-generic6.C
blob: 7ab12d16e474dbe512598884e5ad077b43c2181f (plain)
1
2
3
4
5
6
7
8
9
10
11
// P0428R2
// { dg-do compile { target c++14 } }

struct S { int s; };

auto x =
#if __cpp_generic_lambdas >= 201707
  []<class T = S>(T &&t) { return t.s; } ({ 2 });
#else
  [](auto &&t) { return t.s; } (S { 2 });
#endif