Skip to content

Commit

Permalink
Add missing Allocator template argument for basic_memory_buffer in fo…
Browse files Browse the repository at this point in the history
…rmat_to

Remove deduced default template arguments in format_to and moves the
SFINAE check to a non-deduced template parameter.
  • Loading branch information
voxmea authored and vitaut committed May 21, 2021
1 parent 00149c0 commit 5c4b0c8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions include/fmt/format.h
Original file line number Diff line number Diff line change
Expand Up @@ -2699,10 +2699,10 @@ inline void vformat_to(
return detail::vformat_to(buf, to_string_view(format_str), args);
}

template <typename S, typename... Args, size_t SIZE = inline_buffer_size,
typename Char = enable_if_t<detail::is_string<S>::value, char_t<S>>>
inline auto format_to(basic_memory_buffer<Char, SIZE>& buf, const S& format_str,
Args&&... args) ->
template <typename S, typename... Args, typename Char, size_t SIZE,
typename Allocator, FMT_ENABLE_IF(detail::is_string<S>::value)>
inline auto format_to(basic_memory_buffer<Char, SIZE, Allocator>& buf,
const S& format_str, Args&&... args) ->
typename buffer_context<Char>::iterator {
const auto& vargs = fmt::make_args_checked<Args...>(format_str, args...);
detail::vformat_to(buf, to_string_view(format_str), vargs);
Expand Down

0 comments on commit 5c4b0c8

Please sign in to comment.