diff --git a/include/fmt/compile.h b/include/fmt/compile.h index 9b205997..15158e3a 100644 --- a/include/fmt/compile.h +++ b/include/fmt/compile.h @@ -185,17 +185,6 @@ class prepared_format { prepared_format() = delete; - template ::value)> - inline std::back_insert_iterator format_to( - std::back_insert_iterator out, Args&&... args) const { - internal::container_buffer buffer(internal::get_container(out)); - using range = buffer_range; - this->vformat_to(range(buffer), - basic_format_args{ - make_args_checked(format_, args...)}); - return out; - } - template inline OutputIt format_to(OutputIt out, const Args&... args) const { typedef format_context_t context; @@ -204,15 +193,6 @@ class prepared_format { return this->vformat_to(range(out), basic_format_args(as)); } - template - inline typename buffer_context::iterator format_to( - basic_memory_buffer& buf, const Args&... args) const { - using range = buffer_range; - return this->vformat_to(range(buf), - basic_format_args{ - make_args_checked(format_, args...)}); - } - typedef buffer_context context; template diff --git a/test/compile-test.cc b/test/compile-test.cc index 5d123f4f..15331a69 100644 --- a/test/compile-test.cc +++ b/test/compile-test.cc @@ -672,25 +672,3 @@ TEST(PrepareTest, FormatToBackInserter) { wprepared.format_to(std::back_inserter(ws), 2); EXPECT_EQ(L"42", ws); } - -TEST(PrepareTest, FormatToBasicMemoryBuffer) { - fmt::basic_memory_buffer buffer; - const auto prepared = fmt::compile("4{}"); - prepared.format_to(buffer, 2); - EXPECT_EQ("42", to_string(buffer)); - fmt::basic_memory_buffer wbuffer; - const auto wprepared = fmt::compile(L"4{}"); - wprepared.format_to(wbuffer, 2); - EXPECT_EQ(L"42", to_string(wbuffer)); -} - -TEST(PrepareTest, FormatToMemoryBuffer) { - fmt::memory_buffer buffer; - const auto prepared = fmt::compile("4{}"); - prepared.format_to(buffer, 2); - EXPECT_EQ("42", to_string(buffer)); - fmt::wmemory_buffer wbuffer; - const auto wprepared = fmt::compile(L"4{}"); - wprepared.format_to(wbuffer, 2); - EXPECT_EQ(L"42", to_string(wbuffer)); -}