44 #include <range/v3/range_fwd.hpp> 75 template <
typename file_type>
76 class out_file_iterator
78 static_assert(!std::is_const_v<file_type>,
79 "You cannot iterate over const files, because the iterator changes the file.");
85 using value_type = void;
86 using reference = void;
87 using const_reference = void;
88 using size_type = void;
89 using difference_type = std::ptrdiff_t;
90 using pointer =
void *;
92 using iterator_category = std::output_iterator_tag;
98 constexpr out_file_iterator() =
default;
101 constexpr out_file_iterator(out_file_iterator
const &) =
default;
103 constexpr out_file_iterator & operator=(out_file_iterator
const &) =
default;
105 constexpr out_file_iterator (out_file_iterator &&) =
default;
107 constexpr out_file_iterator & operator=(out_file_iterator &&) =
default;
109 ~out_file_iterator() =
default;
112 constexpr out_file_iterator(file_type & _host) noexcept :
120 out_file_iterator & operator++()
127 out_file_iterator operator++(
int)
134 out_file_iterator & operator*() noexcept
143 template <
typename arg_t>
144 out_file_iterator & operator=(arg_t && arg)
146 assert(host !=
nullptr);
147 host->push_back(std::forward<arg_t>(arg));
167 out_file_iterator
const & it) noexcept
173 out_file_iterator
const & it) noexcept
Adaptations of concepts from the Ranges TS.
Definition: aligned_sequence_concept.hpp:288
::ranges::default_sentinel default_sentinel
Alias for ranges::default_sentinel. Empty sentinel type for use with iterator types that know the bou...
Definition: ranges:215