From a3dfd6f927340af162de5a6cee8c9259d130ea12 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Thu, 30 Jul 2020 11:13:54 -0700 Subject: [PATCH] Workaround a bug in msvc --- include/fmt/format.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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; }