Don't call init_named_args unnecessarily

This commit is contained in:
Victor Zverovich 2023-05-12 11:53:22 -07:00
parent a425e0ff3b
commit 697e76ba30

View File

@ -1765,7 +1765,7 @@ class format_arg_store
{
private:
static const size_t num_args = sizeof...(Args);
static const size_t num_named_args = detail::count_named_args<Args...>();
static constexpr size_t num_named_args = detail::count_named_args<Args...>();
static const bool is_packed = num_args <= detail::max_packed_args;
using value_type = conditional_t<is_packed, detail::value<Context>,
@ -1792,6 +1792,7 @@ class format_arg_store
basic_format_args<Context>(*this),
#endif
data_{detail::make_arg<is_packed, Context>(args)...} {
if (num_named_args != 0)
detail::init_named_args(data_.named_args(), 0, 0, args...);
}
};