Report error on missing named argument (#1796)

This commit is contained in:
Victor Zverovich
2020-07-30 07:16:15 -07:00
parent d82fdcc9e2
commit 21c8b5c142
2 changed files with 3 additions and 2 deletions

View File

@@ -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) {