mirror of
https://github.com/fmtlib/fmt.git
synced 2025-11-30 06:09:48 +01:00
Report error on missing named argument (#1796)
This commit is contained in:
@@ -1913,7 +1913,7 @@ template <typename Context> class basic_format_args {
|
||||
}
|
||||
|
||||
template <typename Char> int get_id(basic_string_view<Char> name) const {
|
||||
if (!has_named_args()) return {};
|
||||
if (!has_named_args()) return -1;
|
||||
const auto& named_args =
|
||||
(is_packed() ? values_[-1] : args_[-1].value_).named_args;
|
||||
for (size_t i = 0; i < named_args.size; ++i) {
|
||||
|
||||
Reference in New Issue
Block a user