diff --git a/include/fmt/core.h b/include/fmt/core.h index 22e519655f668..d8afca903062d 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 constexpr (num_named_args != 0) detail::init_named_args(data_.named_args(), 0, 0, args...); } };