[llvm-bugs] [Bug 42600] New: [7 Regression] Lambda call in template parameter causes compile time error
via llvm-bugs
llvm-bugs at lists.llvm.org
Fri Jul 12 07:46:27 PDT 2019
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: unassignedclangbugs at nondot.org
Reporter: antoshkka at gmail.com
CC: blitzrakete at gmail.com, erik.pilkington at gmail.com,
llvm-bugs at lists.llvm.org, richard-llvm at metafoo.co.uk
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20190712/53956818/attachment-0001.html>
More information about the llvm-bugs
mailing list