Skip to content

Commit

Permalink
Resolve @CaseyCarter's review suggestions
Browse files Browse the repository at this point in the history
Co-authored-by: Casey Carter <Casey@Carter.net>
  • Loading branch information
cbezault and CaseyCarter committed Aug 10, 2020
1 parent 4065715 commit 11f7fb6
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions tests/std/tests/P1614R2_spaceship/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,28 +60,22 @@ 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;
}

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 {};
Expand Down

0 comments on commit 11f7fb6

Please sign in to comment.