From cedfe6e154d1e581cb4d97fe445eb229ce2758ed 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 vformat_to. Moves SFINAE check to non-deduced template parameter in format_to. --- include/fmt/format.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/include/fmt/format.h b/include/fmt/format.h index bbaef4b00c0d2..053c9bd804607 100644 --- a/include/fmt/format.h +++ b/include/fmt/format.h @@ -2691,7 +2691,7 @@ FMT_INLINE auto make_args_checked(const S& fmt, return {args...}; } -template , +template ::value)> inline void vformat_to( detail::buffer& buf, const S& format_str, @@ -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...);