Merge pull request #47967 from jrdi/fix-wide-integer-m1

Fix compilation on MacOS
This commit is contained in:
Robert Schulze 2023-03-28 10:53:29 +02:00 committed by GitHub
commit 91f3edd923
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 1 deletions

View File

@ -1242,7 +1242,7 @@ constexpr integer<Bits, Signed>::operator long double() const noexcept
for (unsigned i = 0; i < _impl::item_count; ++i)
{
long double t = res;
res *= std::numeric_limits<base_type>::max();
res *= static_cast<long double>(std::numeric_limits<base_type>::max());
res += t;
res += tmp.items[_impl::big(i)];
}

View File

@ -125,8 +125,15 @@ public:
if constexpr (std::is_same_v<Data, QuantileTiming<Value>>)
{
/// QuantileTiming only supports unsigned integers. Too large values are also meaningless.
#ifdef OS_DARWIN
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wimplicit-const-int-float-conversion"
#endif
if (isNaN(value) || value > std::numeric_limits<Int64>::max() || value < 0)
return;
#ifdef OS_DARWIN
# pragma clang diagnostic pop
#endif
}
if constexpr (has_second_arg)