[llvm-bugs] [Bug 52074] New: out of line definition should reject template parameter with lambda of unevaluated context
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue Oct 5 02:32:43 PDT 2021
https://bugs.llvm.org/show_bug.cgi?id=52074
Bug ID: 52074
Summary: out of line definition should reject template
parameter with lambda of unevaluated context
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 should be rejected as no matching declaration found as
GCC/MSVC++ does. clang-13 incorrectly passes without considering that two
lambda expressions are never considered as equivalent.
[temp.over.link#5.sentence-4]
1.
template <class T>
struct A{
void spam(decltype([]{}) );
};
template<class T>
void A<T>::spam(decltype([]{}))
{}
2.
struct A{
template <class T>
void spam(decltype([]{}) );
};
template<class T>
void A::spam(decltype([]{}))
{}
Both of above should be rejected as no declaration found.
--
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/20211005/9b1d010b/attachment.html>
More information about the llvm-bugs
mailing list