refactor: workaroud on ratio comparison to enable clang-16 compilation

This commit is contained in:
Mateusz Pusz
2023-08-25 21:16:16 +02:00
parent a2376b9b53
commit 1cb20145c8

View File

@@ -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}; }