Report error on missing named argument (#1796)

This commit is contained in:
Victor Zverovich committed 2020-08-06 07:38:18 -07:00
1 parent 33efc3c94f
commit 0cc73ebf79
2 files changed
+3 -2

No files matched your search

+1 -1
View File
@@ -1713,7 +1713,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) {