diff --git a/deps/ox/src/ox/std/utility.hpp b/deps/ox/src/ox/std/utility.hpp index f1e55301..fbb455d4 100644 --- a/deps/ox/src/ox/std/utility.hpp +++ b/deps/ox/src/ox/std/utility.hpp @@ -32,9 +32,9 @@ constexpr bool cmp_equal(T const t, U const u) noexcept { if constexpr(ox::is_signed_v == ox::is_signed_v) { return t == u; } else if constexpr(ox::is_signed_v) { - return ox::Signed{t} == u; + return t >= 0 && static_cast>(t) == u; } else { - return t == ox::Signed{u}; + return u >= 0 && t == static_cast>(u); } } @@ -43,9 +43,9 @@ constexpr bool cmp_less(T const t, U const u) noexcept { if constexpr(ox::is_signed_v == ox::is_signed_v) { return t < u; } else if constexpr(ox::is_signed_v) { - return ox::Signed{t} < u; + return t >= 0 && static_cast>(t) < u; } else { - return t < ox::Signed{u}; + return u >= 0 && t < static_cast>(u); } }