diff --git a/src/corelib/global/qnumeric_p.h b/src/corelib/global/qnumeric_p.h index 8414a681fc7..47edc9573f9 100644 --- a/src/corelib/global/qnumeric_p.h +++ b/src/corelib/global/qnumeric_p.h @@ -384,7 +384,7 @@ convertDoubleTo(double v, T *value, bool allow_precision_upgrade = true) // Check for in-range value to ensure the conversion is not UB (see the // comment above for Standard language). - if (std::fabs(v) > (std::numeric_limits::max)()) { + if (std::fabs(v) > double{(std::numeric_limits::max)()}) { *value = v < 0 ? -Huge : Huge; return false; }