diff --git a/include/fmt/core.h b/include/fmt/core.h index d828a190..eb80cc2f 100644 --- a/include/fmt/core.h +++ b/include/fmt/core.h @@ -1336,6 +1336,23 @@ typename std::enable_if< return out; } +template +inline typename std::enable_if< + is_contiguous::value, std::back_insert_iterator>::type + format_to(std::back_insert_iterator out, + string_view format_str, const Args & ... args) { + return vformat_to(out, format_str, make_format_args(args...)); +} + +template +inline typename std::enable_if< + is_contiguous::value, std::back_insert_iterator>::type + format_to(std::back_insert_iterator out, + wstring_view format_str, const Args & ... args) { + return vformat_to(out, format_str, + make_format_args(args...)); +} + std::string vformat(string_view format_str, format_args args); std::wstring vformat(wstring_view format_str, wformat_args args); diff --git a/include/fmt/format.h b/include/fmt/format.h index fcb13a25..01eb74cb 100644 --- a/include/fmt/format.h +++ b/include/fmt/format.h @@ -3579,23 +3579,6 @@ inline OutputIt format_to(OutputIt out, string_view format_str, make_format_args::type>(args...)); } -template -inline typename std::enable_if< - is_contiguous::value, std::back_insert_iterator>::type - format_to(std::back_insert_iterator out, - string_view format_str, const Args & ... args) { - return vformat_to(out, format_str, make_format_args(args...)); -} - -template -inline typename std::enable_if< - is_contiguous::value, std::back_insert_iterator>::type - format_to(std::back_insert_iterator out, - wstring_view format_str, const Args & ... args) { - return vformat_to(out, format_str, - make_format_args(args...)); -} - template struct format_to_n_result { /** Iterator past the end of the output range. */