From 2038bf61831eb8faede0883965364a974d1350fe Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Tue, 13 Jul 2021 07:56:24 -0700 Subject: [PATCH] Update format_to usage --- test/fuzzing/chrono-duration.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/fuzzing/chrono-duration.cc b/test/fuzzing/chrono-duration.cc index fdad9894..11a0505a 100644 --- a/test/fuzzing/chrono-duration.cc +++ b/test/fuzzing/chrono-duration.cc @@ -13,8 +13,8 @@ void invoke_inner(fmt::string_view format_str, Rep rep) { #if FMT_FUZZ_FORMAT_TO_STRING std::string message = fmt::format(format_str, value); #else - fmt::memory_buffer buf; - fmt::format_to(buf, format_str, value); + auto buf = fmt::memory_buffer(); + fmt::format_to(std::back_inserter(buf), format_str, value); #endif } catch (std::exception&) { }