From 1a4e892765ef40f4b4bc54b45d7afeec2e0cd75c Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Sun, 11 Feb 2018 08:36:44 -0800 Subject: [PATCH] Move output_range to format.h --- include/fmt/core.h | 16 ---------------- include/fmt/format.h | 16 ++++++++++++++++ 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/include/fmt/core.h b/include/fmt/core.h index 1c56cd44..4e14bced 100644 --- a/include/fmt/core.h +++ b/include/fmt/core.h @@ -809,22 +809,6 @@ inline Container &get_container(std::back_insert_iterator it) { } } // namespace internal -template -class output_range { - private: - OutputIt it_; - - // Unused yet. - typedef void sentinel; - sentinel end() const; - - public: - typedef T value_type; - - explicit output_range(OutputIt it): it_(it) {} - OutputIt begin() const { return it_; } -}; - // Formatting context. template class basic_context : diff --git a/include/fmt/format.h b/include/fmt/format.h index 2a66c9f6..651ddabf 100644 --- a/include/fmt/format.h +++ b/include/fmt/format.h @@ -2727,6 +2727,22 @@ void basic_writer::write_double(T value, const format_specs &spec) { write_padded(n, as, double_writer{n, sign, buffer}); } +template +class output_range { + private: + OutputIt it_; + + // Unused yet. + typedef void sentinel; + sentinel end() const; + + public: + typedef T value_type; + + explicit output_range(OutputIt it): it_(it) {} + OutputIt begin() const { return it_; } +}; + // A range where begin() returns back_insert_iterator. template class back_insert_range: