Nicolas Lesser b6d5c58718 [C++17] Disallow lambdas in template parameters (PR33696).
Summary: This revision disallows lambdas in template parameters, as reported in PR33696.

Reviewers: rsmith

Reviewed By: rsmith

Subscribers: cfe-commits

Differential Revision: https://reviews.llvm.org/D37442

llvm-svn: 336930
2018-07-12 18:45:41 +00:00

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}}
}