From 1029119497ef829cf562cc6a85af3035e4457812 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Mon, 15 Jan 2018 11:37:39 -0800 Subject: [PATCH] Cleanup --- include/fmt/format.h | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/include/fmt/format.h b/include/fmt/format.h index bef0a301..27a39072 100644 --- a/include/fmt/format.h +++ b/include/fmt/format.h @@ -3036,19 +3036,6 @@ inline void format_to(wmemory_buffer &buf, wstring_view format_str, vformat_to(buf, format_str, make_args(args...)); } -template -using back_insert_context = basic_context>; - -template -typename std::enable_if::value>::type - vformat_to(std::back_insert_iterator out, - string_view format_str, - basic_format_args> args) { - using range = back_insert_range; - do_vformat_to>( - range(internal::get_container(out)), format_str, args); -} - template inline typename std::enable_if::value>::type format_to(std::back_insert_iterator out, @@ -3060,9 +3047,11 @@ template inline typename std::enable_if::value>::type format_to(std::back_insert_iterator out, string_view format_str, const Args & ... args) { - // TODO: simplify - auto store = make_args>(args...); - vformat_to(out, format_str, basic_format_args>(store)); + using range = back_insert_range; + auto store = make_args>(args...); + do_vformat_to>( + range(internal::get_container(out)), format_str, + basic_format_args>(store)); } inline std::string vformat(string_view format_str, format_args args) {