aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp2a/lambda-generic3.C
blob: b0d525e80d7f6fb48197255568a6dbfa125efeb5 (plain)
1
2
3
4
5
6
7
8
// P0428R2
// { dg-do compile }
// { dg-options "-Wpedantic" }

int j = []<class T>(T t, int i) { return i; }(3, 4);
// { dg-warning "lambda templates are only available with" "" { target c++17_down } .-1 }
// { dg-warning "lambda expressions only available with" "" { target c++98_only } .-2 }
// { dg-error "invalid use of 'auto'" "" { target c++98_only } .-3 }