https://bugs.llvm.org/show_bug.cgi?id=48252
Bug ID: 48252
Summary: Adding an operator== breaks implicit operator==
generation from defaulted <=>
Product: clang
Version: unspecified
Hardware: PC
OS: Windows NT
Status: NEW
Severity: enhancement
Priority: P
Component: C++2a
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected],
[email protected], [email protected]
Reduced example:
#include <compare>
struct X
{
auto operator<=>(X const&) const = default;
auto operator==(int i) const;
};
bool f(X x) {
return x == x;
}
clang trunk rejects this saying no matching candidate. The presence of the
unrelated operator== seems to prevent the generation of X::operator==(X const&)
const from the defaulted <=>.
--
You are receiving this mail because:
You are on the CC list for the bug._______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs