llvm-for-llvmta/tools/clang/test/CXX/expr/expr.prim/expr.prim.lambda/p2-template-parameter.cpp

8 lines
210 B
C++

// RUN: %clang_cc1 -std=c++17 %s -verify
template<auto> struct Nothing {};
void pr33696() {
Nothing<[]() { return 0; }()> nothing; // expected-error{{a lambda expression cannot appear in this context}}
}