https://bugs.llvm.org/show_bug.cgi?id=47893
Bug ID: 47893
Summary: Rewritten comparison expression is not checked for
SFINAE
Product: clang
Version: trunk
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]
https://gcc.godbolt.org/z/zsbc1Y
Clang fails to substitute foo here, while it should have picked the second
overload because of SFINAE:
#include <compare>
struct X
{
void operator <=>(X const &) const {}
};
template<typename T, typename = decltype(T{} < T{})>
void foo(T t) {}
template<typename>
void foo(...);
void test()
{
foo<X>(X{});
}
--
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