| 1 |
// RUN: %clang_cc1 -std=c++20 -verify %s |
| 2 |
// expected-no-diagnostics |
| 3 |
|
| 4 |
namespace SpaceshipImpliesEq { |
| 5 |
template<typename T> struct A { |
| 6 |
int operator<=>(const A&) const = default; |
| 7 |
constexpr bool f() { return operator==(*this); } |
| 8 |
}; |
| 9 |
static_assert(A<int>().f()); |
| 10 |
} |