mirror of
https://github.com/fmtlib/fmt.git
synced 2024-12-27 12:38:37 +00:00
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:
parent
179c7e5a66
commit
35547d6003
@ -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...);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user