From 967c3946e492e4d05aa98b0d08081efb6192ce03 Mon Sep 17 00:00:00 2001 From: Matthew Gilbert Date: Thu, 20 May 2021 20:02:33 -0400 Subject: [PATCH] Add missing Allocator template argument for basic_memory_buffer in format_to Remove deduced default template arguments in format_to and moves the SFINAE check to a non-deduced template parameter. --- include/fmt/format.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/include/fmt/format.h b/include/fmt/format.h index bbaef4b00c0d2..e9ea6e80de389 100644 --- a/include/fmt/format.h +++ b/include/fmt/format.h @@ -2699,9 +2699,10 @@ inline void vformat_to( return detail::vformat_to(buf, to_string_view(format_str), args); } -template ::value, char_t>> -inline auto format_to(basic_memory_buffer& buf, const S& format_str, +template ::value)> +inline auto format_to(basic_memory_buffer& buf, + const S& format_str, Args&&... args) -> typename buffer_context::iterator { const auto& vargs = fmt::make_args_checked(format_str, args...);