Skip to content

Commit

Permalink
refactor: workaroud on ratio comparison to enable clang-16 compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
mpusz committed Aug 25, 2023
1 parent a2376b9 commit 1cb2014
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/include/mp-units/bits/ratio.h
Original file line number Diff line number Diff line change
Expand Up @@ -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}; }

Expand Down

0 comments on commit 1cb2014

Please sign in to comment.