11 lines · cpp
1// RUN: %clang_cc1 -std=c++20 -verify %s2// expected-no-diagnostics3 4namespace 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}11