[llvm-bugs] [Bug 33696] New: clang accepts lambda expression in template argument
via llvm-bugs
llvm-bugs at lists.llvm.org
Thu Jul 6 01:30:09 PDT 2017
https://bugs.llvm.org/show_bug.cgi?id=33696
Bug ID: 33696
Summary: clang accepts lambda expression in template argument
Product: clang
Version: trunk
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P
Component: C++
Assignee: unassignedclangbugs at nondot.org
Reporter: trass3r at gmail.com
CC: dgregor at apple.com, llvm-bugs at lists.llvm.org
clang r307127
void foo();
template <auto f>
struct F
{
~F() { f(); }
};
int main()
{
F<+[](){foo();}> f;
}
Note the + to force the conversion to function pointer. gcc rejects it.
https://stackoverflow.com/questions/44485610/will-i-be-able-to-declare-a-constexpr-lambda-inside-a-template-parameter
--
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/20170706/9ac89c80/attachment-0001.html>
More information about the llvm-bugs
mailing list