From c9102619da70319a4a298699ce0eeb3221cd2d5a Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Sun, 14 Jul 2024 08:41:35 -0700 Subject: [PATCH] Avoid extra reserve --- include/fmt/format.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/include/fmt/format.h b/include/fmt/format.h index 7c2a19b4084d..cb88180b1aa3 100644 --- a/include/fmt/format.h +++ b/include/fmt/format.h @@ -3629,9 +3629,7 @@ auto write(OutputIt out, monostate, format_specs = {}, locale_ref = {}) template FMT_CONSTEXPR auto write(OutputIt out, basic_string_view value) -> OutputIt { - auto it = reserve(out, value.size()); - it = copy_noinline(value.begin(), value.end(), it); - return base_iterator(out, it); + return copy_noinline(value.begin(), value.end(), out); } template