Merge pull request #122 from jwakely/patch-1

Fix deduction failure for std::min call
This commit is contained in:
Daniel Lemire 2022-01-18 14:30:38 -05:00 committed by GitHub
commit 32d21dcecb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -86,7 +86,7 @@ fastfloat_really_inline void round(adjusted_mantissa& am, callback cb) noexcept
if (-am.power2 >= mantissa_shift) {
// have a denormal float
int32_t shift = -am.power2 + 1;
cb(am, std::min(shift, 64));
cb(am, std::min<int32_t>(shift, 64));
// check for round-up: if rounding-nearest carried us to the hidden bit.
am.power2 = (am.mantissa < (uint64_t(1) << binary_format<T>::mantissa_explicit_bits())) ? 0 : 1;
return;