diff --git a/include/fmt/format.h b/include/fmt/format.h index f4b2c53d..95df0ad0 100644 --- a/include/fmt/format.h +++ b/include/fmt/format.h @@ -2695,7 +2695,7 @@ FMT_CONSTEXPR20 auto write_float(OutputIt out, const DecimalFP& f, } template constexpr auto isnan(T value) -> bool { - return !(value >= value); // std::isnan doesn't support __float128. + return value != value; // std::isnan doesn't support __float128. } template