diff --git a/mfbt/Casting.h b/mfbt/Casting.h index 518208ebe1..f681309b6d 100644 --- a/mfbt/Casting.h +++ b/mfbt/Casting.h @@ -65,13 +65,11 @@ namespace detail { template constexpr int64_t safe_integer() { - static_assert(std::is_floating_point_v); return std::pow(2, std::numeric_limits::digits); } template constexpr uint64_t safe_integer_unsigned() { - static_assert(std::is_floating_point_v); return std::pow(2, std::numeric_limits::digits); } @@ -105,7 +103,6 @@ bool IsInBounds(In aIn) { } // Normal casting applies, the floating point number is floored. if constexpr (inFloat && !outFloat) { - static_assert(sizeof(aIn) <= sizeof(int64_t)); // Check if the input floating point is larger than the output bounds. This // catches situations where the input is a float larger than the max of the // output type. @@ -181,7 +178,6 @@ template inline To AssertedCast(const From aFrom) { - static_assert(std::is_arithmetic_v && std::is_arithmetic_v); MOZ_ASSERT((detail::IsInBounds(aFrom))); return static_cast(aFrom); } @@ -197,7 +193,6 @@ template inline To ReleaseAssertedCast(const From aFrom) { - static_assert(std::is_arithmetic_v && std::is_arithmetic_v); MOZ_RELEASE_ASSERT((detail::IsInBounds(aFrom))); return static_cast(aFrom); }