Remove undocumented buffer_range and output_range

This commit is contained in:
Victor Zverovich
2020-05-30 13:03:41 -07:00
parent 57fc44907f
commit 3245145a41
4 changed files with 9 additions and 90 deletions

View File

@@ -495,22 +495,6 @@ class truncating_iterator<OutputIt, std::true_type>
truncating_iterator& operator*() { return *this; }
};
// A range with the specified output iterator and value type.
template <typename OutputIt, typename T = typename OutputIt::value_type>
class output_range {
private:
OutputIt it_;
public:
using value_type = T;
using iterator = OutputIt;
struct sentinel {};
explicit output_range(OutputIt it) : it_(it) {}
OutputIt begin() const { return it_; }
sentinel end() const { return {}; } // Sentinel is not used yet.
};
template <typename Char>
inline size_t count_code_points(basic_string_view<Char> s) {
return s.size();
@@ -587,18 +571,6 @@ void buffer<T>::append(const U* begin, const U* end) {
}
} // namespace detail
// DEPRECATED! A range with an iterator appending to a buffer.
template <typename T>
class buffer_range
: public detail::output_range<std::back_insert_iterator<detail::buffer<T>>,
T> {
public:
using iterator = std::back_insert_iterator<detail::buffer<T>>;
using detail::output_range<iterator, T>::output_range;
buffer_range(detail::buffer<T>& buf)
: detail::output_range<iterator, T>(std::back_inserter(buf)) {}
};
// The number of characters to store in the basic_memory_buffer object itself
// to avoid dynamic memory allocation.
enum { inline_buffer_size = 500 };