Skip to content

Commit

Permalink
Need to map every element too.
Browse files Browse the repository at this point in the history
  • Loading branch information
brevzin committed Jan 2, 2022
1 parent 890ad12 commit 8b681f1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion include/fmt/ranges.h
Original file line number Diff line number Diff line change
Expand Up @@ -654,6 +654,7 @@ struct formatter<
Char prefix = detail::is_set<R>::value ? '{' : '[';
Char postfix = detail::is_set<R>::value ? '}' : ']';
#endif
detail::range_mapper<buffer_context<Char>, detail::uncvref_type<R>> mapper;
auto out = ctx.out();
*out++ = prefix;
int i = 0;
Expand All @@ -663,7 +664,7 @@ struct formatter<
if (i > 0) out = detail::write_delimiter(out);
if (custom_specs_) {
ctx.advance_to(out);
out = underlying_.format(*it, ctx);
out = underlying_.format(mapper.map(*it), ctx);
} else {
out = detail::write_range_entry<Char>(out, *it);
}
Expand Down

0 comments on commit 8b681f1

Please sign in to comment.