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: unassignedclangb...@nondot.org
Reporter: tras...@gmail.com
CC: dgre...@apple.com, llvm-bugs@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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs