[llvm-bugs] [Bug 52299] New: lambda in unevaluated-context is parsed incorrectedly
via llvm-bugs
llvm-bugs at lists.llvm.org
Mon Oct 25 14:52:36 PDT 2021
https://bugs.llvm.org/show_bug.cgi?id=52299
Bug ID: 52299
Summary: lambda in unevaluated-context is parsed incorrectedly
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: C++2b
Assignee: unassignedclangbugs at nondot.org
Reporter: nickhuang99 at hotmail.com
CC: blitzrakete at gmail.com, erik.pilkington at gmail.com,
llvm-bugs at lists.llvm.org, richard-llvm at metafoo.co.uk
The following code is accepted incorrectly by clang while GCC and MSVC++ all
spot the failure of assertion. The type of "foo<int>" is obviously NOT "void"
at all.
template<class T>
void foo(decltype(+[](T){}) lambda, T param);
static_assert(__is_same(decltype(foo<int>), void));
--
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/20211025/20d97912/attachment.html>
More information about the llvm-bugs
mailing list