From 1a18a2f3dd6c76e78e2e98f6147e71736f752bdb Mon Sep 17 00:00:00 2001 From: Ivan Shynkarenka Date: Mon, 21 Feb 2022 09:26:16 -0600 Subject: [PATCH] Fixing "C4127: conditional expression is constant" Visual Studio 2022 warning in pedantic mode (#2783) --- include/fmt/format.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/fmt/format.h b/include/fmt/format.h index cae24f144064..1d4d3cb8cf27 100644 --- a/include/fmt/format.h +++ b/include/fmt/format.h @@ -2260,7 +2260,7 @@ FMT_CONSTEXPR20 auto write(OutputIt out, T value, precision = 1; } if (const_check(std::is_same())) fspecs.binary32 = true; - if (!std::numeric_limits::is_iec559 || std::numeric_limits::digits > 64) + if (const_check(!std::numeric_limits::is_iec559 || std::numeric_limits::digits > 64)) fspecs.fallback = true; int exp = format_float(convert_float(value), precision, fspecs, buffer); fspecs.precision = precision;