From 5013c157376fadb57f6bfd1d69732d82ae5f8fab Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Sat, 10 Feb 2018 06:52:46 -0800 Subject: [PATCH] Silence MSVC 2017 constant if expression warning --- include/fmt/printf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/fmt/printf.h b/include/fmt/printf.h index 13f20796..522d8d01 100644 --- a/include/fmt/printf.h +++ b/include/fmt/printf.h @@ -99,7 +99,7 @@ class ArgConverter { bool is_signed = type_ == 'd' || type_ == 'i'; typedef typename std::conditional< std::is_same::value, U, T>::type TargetType; - if (sizeof(TargetType) <= sizeof(int)) { + if (const_check(sizeof(TargetType) <= sizeof(int))) { // Extra casts are used to silence warnings. if (is_signed) { arg_ = internal::make_arg(