diff --git a/include/fmt/format.h b/include/fmt/format.h index 7213a0da..ca7cefd9 100644 --- a/include/fmt/format.h +++ b/include/fmt/format.h @@ -724,13 +724,18 @@ class FMT_API format_error : public std::runtime_error { namespace detail { +template +constexpr bool is_signed() { + return std::numeric_limits::is_signed || std::is_same(); +} + // Returns true if value is negative, false otherwise. // Same as `value < 0` but doesn't produce warnings if T is an unsigned type. -template ::is_signed)> +template ())> FMT_CONSTEXPR bool is_negative(T value) { return value < 0; } -template ::is_signed)> +template ())> FMT_CONSTEXPR bool is_negative(T) { return false; }