Enable Char types other than char (#2323)

This commit is contained in:
Daniela Engert 2021-05-29 20:42:16 +02:00 committed by GitHub
parent ff37e41625
commit 00a39ad5f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2881,7 +2881,7 @@ inline auto format_to_n(OutputIt out, size_t n, const S& fmt,
template <typename S, typename... Args, typename Char = char_t<S>,
FMT_ENABLE_IF(!std::is_same<Char, char>::value)>
inline auto formatted_size(const S& fmt, Args&&... args) -> size_t {
detail::counting_buffer<> buf;
detail::counting_buffer<Char> buf;
const auto& vargs = fmt::make_args_checked<Args...>(fmt, args...);
detail::vformat_to(buf, to_string_view(fmt), vargs);
return buf.count();