diff --git a/include/fmt/format.h b/include/fmt/format.h index 9970444c..5a59f0b9 100644 --- a/include/fmt/format.h +++ b/include/fmt/format.h @@ -3070,9 +3070,7 @@ struct format_handler : detail::error_handler { void on_text(const Char* begin, const Char* end) { auto size = to_unsigned(end - begin); auto out = context.out(); - auto&& it = reserve(out, size); - it = std::copy_n(begin, size, it); - context.advance_to(out); + context.advance_to(write(out, basic_string_view(begin, size))); } int on_arg_id() { return parse_context.next_arg_id(); }