mirror of
https://github.com/mpusz/mp-units.git
synced 2025-08-02 20:04:27 +02:00
refactor: workaroud on ratio
comparison to enable clang-16 compilation
This commit is contained in:
@@ -79,8 +79,8 @@ struct ratio {
|
||||
}
|
||||
}
|
||||
|
||||
[[nodiscard]] friend consteval bool operator==(ratio, ratio) = default;
|
||||
[[nodiscard]] friend consteval auto operator<=>(ratio lhs, ratio rhs) { return (lhs - rhs).num <=> 0; }
|
||||
[[nodiscard]] friend MP_UNITS_CONSTEVAL bool operator==(ratio, ratio) = default;
|
||||
[[nodiscard]] friend MP_UNITS_CONSTEVAL auto operator<=>(ratio lhs, ratio rhs) { return (lhs - rhs).num <=> 0; }
|
||||
|
||||
[[nodiscard]] friend MP_UNITS_CONSTEVAL ratio operator-(ratio r) { return ratio{-r.num, r.den}; }
|
||||
|
||||
|
Reference in New Issue
Block a user