diff --git a/include/fmt/xchar.h b/include/fmt/xchar.h index 6439290df9fac..d3ac1b1262a26 100644 --- a/include/fmt/xchar.h +++ b/include/fmt/xchar.h @@ -188,7 +188,8 @@ template , FMT_ENABLE_IF(detail::is_output_iterator::value&& detail::is_exotic_char::value)> -inline auto format_to(OutputIt out, const S& format_str, T&&... args) -> OutputIt { +inline auto format_to(OutputIt out, const S& format_str, T&&... args) + -> OutputIt { return vformat_to(out, fmt::basic_string_view(format_str), fmt::make_format_args>(args...)); } @@ -207,11 +208,11 @@ inline auto vformat_to(OutputIt out, const Locale& loc, const S& format_str, return detail::get_iterator(buf, out); } -template , - bool enable = detail::is_output_iterator::value && - detail::is_locale::value && - detail::is_exotic_char::value> +template < + typename OutputIt, typename Locale, typename S, typename... T, + typename Char = detail::format_string_char_t, + bool enable = detail::is_output_iterator::value&& + detail::is_locale::value&& detail::is_exotic_char::value> inline auto format_to(OutputIt out, const Locale& loc, const S& format_str, T&&... args) -> typename std::enable_if::type {