[committed,1/2] libstdc++: Fix deduction failure for std::min call [PR104080]
Commit Message
Tested x86_64-linux, pushed to trunk.
Reported upstream as https://github.com/fastfloat/fast_float/pull/122
libstdc++-v3/ChangeLog:
PR libstdc++/104080
* src/c++17/fast_float/LOCAL_PATCHES: UPDATE.
* src/c++17/fast_float/fast_float.h (round): Use explicit
template argument list for std::min.
---
libstdc++-v3/src/c++17/fast_float/LOCAL_PATCHES | 1 +
libstdc++-v3/src/c++17/fast_float/fast_float.h | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
@@ -1,2 +1,3 @@
r12-6647
r12-6648
+r12-6664
@@ -2466,7 +2466,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;