Allow mixing named and automatic arguments

This commit is contained in:
Victor Zverovich
2017-12-09 08:15:13 -08:00
parent 7cea163809
commit 971fb584c3
2 changed files with 5 additions and 6 deletions

View File

@@ -3001,12 +3001,10 @@ struct dynamic_formatter {
template <typename Char>
inline typename basic_context<Char>::format_arg
basic_context<Char>::get_arg(basic_string_view<Char> name) {
if (this->check_no_auto_index()) {
map_.init(this->args());
if (const format_arg *arg = map_.find(name))
return *arg;
this->on_error("argument not found");
}
map_.init(this->args());
if (const format_arg *arg = map_.find(name))
return *arg;
this->on_error("argument not found");
return format_arg();
}