diff options
Diffstat (limited to 'src/coord.hh')
| -rw-r--r-- | src/coord.hh | 33 |
1 files changed, 3 insertions, 30 deletions
diff --git a/src/coord.hh b/src/coord.hh index 6109bf14..30f8e1c0 100644 --- a/src/coord.hh +++ b/src/coord.hh @@ -42,31 +42,10 @@ struct LineAndColumn } [[gnu::always_inline]] - constexpr bool operator< (EffectiveType other) const + constexpr auto operator<=> (EffectiveType other) const { - return (line != other.line) ? line < other.line - : column < other.column; - } - - [[gnu::always_inline]] - constexpr bool operator<= (EffectiveType other) const - { - return (line != other.line) ? line < other.line - : column <= other.column; - } - - [[gnu::always_inline]] - constexpr bool operator> (EffectiveType other) const - { - return (line != other.line) ? line > other.line - : column > other.column; - } - - [[gnu::always_inline]] - constexpr bool operator>= (EffectiveType other) const - { - return (line != other.line) ? line > other.line - : column >= other.column; + return (line != other.line) ? line <=> other.line + : column <=> other.column; } [[gnu::always_inline]] @@ -75,12 +54,6 @@ struct LineAndColumn return line == other.line and column == other.column; } - [[gnu::always_inline]] - constexpr bool operator!= (EffectiveType other) const - { - return line != other.line or column != other.column; - } - friend constexpr size_t hash_value(const EffectiveType& val) { return hash_values(val.line, val.column); |
