out of line definition should reject template parameter with lambda of unevaluated context · Issue #51416 · llvm/llvm-project (original) (raw)
Bugzilla Link | 52074 |
---|---|
Version | trunk |
OS | Linux |
CC | @dwblaikie,@zygoloid |
Extended Description
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]
template
struct A{
void spam(decltype([]{}) );
};
template
void A::spam(decltype([]{}))
{}
struct A{
template
void spam(decltype([]{}) );
};
template
void A::spam(decltype([]{}))
{}
Both of above should be rejected as no declaration found.