Fix formatting of some nested ranges

This commit is contained in:
Victor Zverovich
2023-12-23 09:11:50 -08:00
parent 3eb3aef575
commit e7875ae0fa
2 changed files with 21 additions and 3 deletions

View File

@@ -482,7 +482,8 @@ struct range_formatter<
for (; it != end; ++it) {
if (i > 0) out = detail::copy_str<Char>(separator_, out);
ctx.advance_to(out);
out = underlying_.format(mapper.map(*it), ctx);
auto&& item = *it;
out = underlying_.format(mapper.map(item), ctx);
++i;
}
out = detail::copy_str<Char>(closing_bracket_, out);