Remove unnecessary overloads

This commit is contained in:
Victor Zverovich 2019-08-03 08:25:30 -07:00
parent 436acf3489
commit 3df0ea34e5
2 changed files with 0 additions and 42 deletions

View File

@ -185,17 +185,6 @@ class prepared_format {
prepared_format() = delete;
template <typename Container, FMT_ENABLE_IF(is_contiguous<Container>::value)>
inline std::back_insert_iterator<Container> format_to(
std::back_insert_iterator<Container> out, Args&&... args) const {
internal::container_buffer<Container> buffer(internal::get_container(out));
using range = buffer_range<char_type>;
this->vformat_to(range(buffer),
basic_format_args<context>{
make_args_checked<Args...>(format_, args...)});
return out;
}
template <typename OutputIt>
inline OutputIt format_to(OutputIt out, const Args&... args) const {
typedef format_context_t<OutputIt, char_type> context;
@ -204,15 +193,6 @@ class prepared_format {
return this->vformat_to(range(out), basic_format_args<context>(as));
}
template <std::size_t SIZE = inline_buffer_size>
inline typename buffer_context<char_type>::iterator format_to(
basic_memory_buffer<char_type, SIZE>& buf, const Args&... args) const {
using range = buffer_range<char_type>;
return this->vformat_to(range(buf),
basic_format_args<context>{
make_args_checked<Args...>(format_, args...)});
}
typedef buffer_context<char_type> context;
template <typename Range, typename Context>

View File

@ -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<char, 100> buffer;
const auto prepared = fmt::compile<int>("4{}");
prepared.format_to(buffer, 2);
EXPECT_EQ("42", to_string(buffer));
fmt::basic_memory_buffer<wchar_t, 100> wbuffer;
const auto wprepared = fmt::compile<int>(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<int>("4{}");
prepared.format_to(buffer, 2);
EXPECT_EQ("42", to_string(buffer));
fmt::wmemory_buffer wbuffer;
const auto wprepared = fmt::compile<int>(L"4{}");
wprepared.format_to(wbuffer, 2);
EXPECT_EQ(L"42", to_string(wbuffer));
}