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.
This commit is contained in:
Dana Jansens 2023-05-30 21:49:11 -04:00 committed by Victor Zverovich
parent 179c7e5a66
commit 35547d6003

View File

@ -1786,7 +1786,7 @@ class format_arg_store
basic_format_args<Context>(*this), basic_format_args<Context>(*this),
#endif #endif
data_{detail::make_arg<is_packed, Context>(args)...} { data_{detail::make_arg<is_packed, Context>(args)...} {
if (num_named_args != 0) if (detail::const_check(num_named_args != 0))
detail::init_named_args(data_.named_args(), 0, 0, args...); detail::init_named_args(data_.named_args(), 0, 0, args...);
} }
}; };