From c684349195c129f3ac0776c120a5d9ebf60e2e19 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Sun, 22 Jul 2018 18:09:22 -0700 Subject: [PATCH] Move contiguous version of format_to to fmt/core.h --- include/fmt/core.h | 17 +++++++++++++++++ include/fmt/format.h | 17 ----------------- 2 files changed, 17 insertions(+), 17 deletions(-) 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. */