Skip to content

out of line definition should reject template parameter with lambda of unevaluated context #51416

Closed
@nickhuang99

Description

@nickhuang99
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.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions