#include #include struct Foo { int x, y; auto operator<=>(const Foo&) const = default; }; int main() { Foo a{1,3}, b{2,1}; assert( (a < b) && (a <= b) && !(a == b) && (a != b) && !(a >= b) && !(a > b) ); }