diff --git a/include/fmt/format.h b/include/fmt/format.h index abf2ed9a..ceda63ec 100644 --- a/include/fmt/format.h +++ b/include/fmt/format.h @@ -732,17 +732,17 @@ 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(); -} +using is_signed = + std::integral_constant::is_signed || + std::is_same::value>; // Returns true if value is negative, false otherwise. // Same as `value < 0` but doesn't produce warnings if T is an unsigned type. -template ())> +template ::value)> FMT_CONSTEXPR bool is_negative(T value) { return value < 0; } -template ())> +template ::value)> FMT_CONSTEXPR bool is_negative(T) { return false; }