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: