https://bugs.llvm.org/show_bug.cgi?id=42600
Bug ID: 42600
Summary: [7 Regression] Lambda call in template parameter
causes compile time error
Product: clang
Version: 7.0
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: C++17
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected],
[email protected], [email protected]
Following example compiles in Clang-6 and GCC with flags "-O2 -std=c++17", but
fail to compile in Clang-7, Clang-8 and trunk:
template <int I> struct stuff {};
stuff< [](){ return 42; }() > a; // Calling a constexpr lambda
Error message: lambda expression cannot appear in this context
--
You are receiving this mail because:
You are on the CC list for the bug._______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs