diff --git a/tests/std/tests/P1614R2_spaceship/test.cpp b/tests/std/tests/P1614R2_spaceship/test.cpp index e589cedafc..c960ca9510 100644 --- a/tests/std/tests/P1614R2_spaceship/test.cpp +++ b/tests/std/tests/P1614R2_spaceship/test.cpp @@ -60,13 +60,15 @@ struct SynthOrdered { struct OrderedChar { OrderedChar() = default; - OrderedChar(const char c) : c(c){}; + OrderedChar(const char c) : c(c) {} OrderedChar& operator=(const char& other) { c = other; return *this; } + auto operator<=>(const OrderedChar&) const = default; + operator char() const { return c; } @@ -74,14 +76,6 @@ struct OrderedChar { char c; }; -auto operator<=>(const OrderedChar& left, const OrderedChar& right) { - return left.c <=> right.c; -} - -auto operator==(const OrderedChar& left, const OrderedChar& right) { - return left.c == right.c; -} - struct WeaklyOrderedChar : OrderedChar {}; struct WeaklyOrderdByOmissionChar : OrderedChar {}; struct PartiallyOrderedChar : OrderedChar {};