Don't inherit context from parse_context

This commit is contained in:
Victor Zverovich
2018-01-14 09:27:40 -08:00
parent 217e7c76f1
commit 67928eae28
4 changed files with 38 additions and 28 deletions

View File

@@ -373,7 +373,7 @@ typename basic_printf_context<Range, AF>::format_arg
basic_printf_context<Range, AF>::get_arg(iterator it, unsigned arg_index) {
(void)it;
if (arg_index == std::numeric_limits<unsigned>::max())
return this->do_get_arg(this->next_arg_id());
return this->do_get_arg(this->parse_context().next_arg_id());
return Base::get_arg(arg_index - 1);
}
@@ -417,8 +417,7 @@ unsigned basic_printf_context<Range, AF>::parse_header(
template <typename Range, typename AF>
void basic_printf_context<Range, AF>::format() {
auto &buffer = this->range().container();
Base &base = *this;
auto start = iterator(base);
auto start = iterator(this->parse_context());
auto it = start;
using internal::pointer_from;
while (*it) {