From 35547d600368ede20033664b2ede1ae4807dc0c3 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 d6142a01..4961310a 100644 --- a/include/fmt/core.h +++ b/include/fmt/core.h @@ -1786,7 +1786,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...); } };