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: unassignedclangb...@nondot.org
Reporter: igor.akhme...@gmail.com
CC: blitzrak...@gmail.com, erik.pilking...@gmail.com,
llvm-bugs@lists.llvm.org, richard-l...@metafoo.co.uk
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
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs