blob: d3f95e13f135469e332e204dc1e2b3fe459bdf60 [file] [log] [blame]
// PR c++/94162
// { dg-do compile { target c++20 } }
#include <compare>
struct S {
int a; // { dg-error "three-way comparison of 'S::a' has type 'std::strong_ordering', which does not convert to 'int\\*'" }
int *operator<=>(const S&) const = default;
};
bool b = S{} < S{}; // { dg-error "use of deleted function 'constexpr int\\* S::operator<=>\\\(const S&\\\) const'" }