diff --git a/include/fmt/format.h b/include/fmt/format.h index de73eae1..2d18621a 100644 --- a/include/fmt/format.h +++ b/include/fmt/format.h @@ -950,19 +950,19 @@ using is_signed = // Returns true if value is negative, false otherwise. // Same as `value < 0` but doesn't produce warnings if T is an unsigned type. template ::value)> -FMT_CONSTEXPR auto is_negative(T value) -> bool { +constexpr auto is_negative(T value) -> bool { return value < 0; } template ::value)> -FMT_CONSTEXPR auto is_negative(T) -> bool { +constexpr auto is_negative(T) -> bool { return false; } -template -FMT_CONSTEXPR auto is_supported_floating_point(T) -> uint16_t { - return (std::is_same::value && FMT_USE_FLOAT) || - (std::is_same::value && FMT_USE_DOUBLE) || - (std::is_same::value && FMT_USE_LONG_DOUBLE); +template constexpr auto is_supported_floating_point(T) -> bool { + return (std::is_same() && FMT_USE_FLOAT) || + (std::is_same() && FMT_USE_DOUBLE) || + (std::is_same() && FMT_USE_LONG_DOUBLE) || + is_float128(); } // Smallest of uint32_t, uint64_t, uint128_t that is large enough to