P0428R2 - familiar template syntax for generic lambdas
[official-gcc.git] / gcc / testsuite / g++.dg / cpp2a / lambda-generic4.C
blob393e8523f08d7aba8e07cd02381524d867871921
1 // P0428R2
2 // { dg-do compile }
3 // { dg-options "-Wno-pedantic" }
5 int j = []<class T>(T t, int i) { return i; }(3, 4);
6 // { dg-warning "lambda templates are only available with" "" { target c++11_down } .-1 }
7 // { dg-warning "lambda expressions only available with" "" { target c++98_only } .-2 }
8 // { dg-error "invalid use of 'auto'" "" { target c++98_only } .-3 }