From e27be85c649ad1c2381aa96685e5f2fccde326c4 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Tue, 30 May 2023 21:49:11 -0400 Subject: [PATCH] Use const_check to silence MSVC warning The condition is constexpr, so the compiler warns if a runtime check is used as there's no need to generate code for it. --- include/fmt/core.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/fmt/core.h b/include/fmt/core.h index 22e519655f668..0c61715615ee0 100644 --- a/include/fmt/core.h +++ b/include/fmt/core.h @@ -1804,7 +1804,7 @@ class format_arg_store basic_format_args(*this), #endif data_{detail::make_arg(args)...} { - if (num_named_args != 0) + if (detail::const_check(num_named_args != 0)) detail::init_named_args(data_.named_args(), 0, 0, args...); } };