mirror of
https://github.com/fmtlib/fmt.git
synced 2025-01-27 06:35:37 +00:00
Move output_range to format.h
This commit is contained in:
parent
522de7b55d
commit
1a4e892765
@ -809,22 +809,6 @@ inline Container &get_container(std::back_insert_iterator<Container> it) {
|
||||
}
|
||||
} // namespace internal
|
||||
|
||||
template <typename OutputIt, typename T = typename OutputIt::value_type>
|
||||
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 <typename OutputIt, typename Char>
|
||||
class basic_context :
|
||||
|
@ -2727,6 +2727,22 @@ void basic_writer<Range>::write_double(T value, const format_specs &spec) {
|
||||
write_padded(n, as, double_writer{n, sign, buffer});
|
||||
}
|
||||
|
||||
template <typename OutputIt, typename T = typename OutputIt::value_type>
|
||||
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 <typename Container>
|
||||
class back_insert_range:
|
||||
|
Loading…
x
Reference in New Issue
Block a user