diff --git a/include/fmt/core.h b/include/fmt/core.h index 75c04fd8..76569a2d 100644 --- a/include/fmt/core.h +++ b/include/fmt/core.h @@ -728,7 +728,6 @@ template class buffer { /** Appends data to the end of the buffer. */ template void append(const U* begin, const U* end); - template void append(const ContiguousRange&); template T& operator[](I index) { return ptr_[index]; } template const T& operator[](I index) const { diff --git a/include/fmt/format.h b/include/fmt/format.h index ab208c89..93e4b1e6 100644 --- a/include/fmt/format.h +++ b/include/fmt/format.h @@ -566,12 +566,6 @@ void buffer::append(const U* begin, const U* end) { } while (begin != end); } -template -template -void buffer::append(const ContiguousRange& range) { - append(range.data(), range.data() + range.size()); -} - template void iterator_buffer::flush() { out_ = std::copy_n(data_, this->limit(this->size()), out_); @@ -691,6 +685,13 @@ class basic_memory_buffer : public detail::buffer { /** Increases the buffer capacity to *new_capacity*. */ void reserve(size_t new_capacity) { this->try_reserve(new_capacity); } + + // Directly append data into the buffer + using detail::buffer::append; + template + void append(const ContiguousRange& range) { + append(range.data(), range.data() + range.size()); + } }; template