20namespace seqan3::detail
45template <
typename file_type>
46class out_file_iterator
48 static_assert(!std::is_const_v<file_type>,
49 "You cannot iterate over const files, because the iterator changes the file.");
58 using value_type = void;
60 using reference = void;
62 using const_reference = void;
64 using size_type = void;
68 using pointer =
void *;
77 constexpr out_file_iterator() =
default;
79 constexpr out_file_iterator(out_file_iterator
const &) =
default;
81 constexpr out_file_iterator & operator=(out_file_iterator
const &) =
default;
83 constexpr out_file_iterator(out_file_iterator &&) =
default;
85 constexpr out_file_iterator & operator=(out_file_iterator &&) =
default;
87 ~out_file_iterator() =
default;
90 constexpr out_file_iterator(file_type & _host) noexcept : host{&_host}
98 out_file_iterator & operator++()
104 out_file_iterator operator++(
int)
111 out_file_iterator & operator*() noexcept
120 template <
typename arg_t>
121 out_file_iterator & operator=(arg_t && arg)
123 assert(host !=
nullptr);
124 host->push_back(std::forward<arg_t>(arg));
135 constexpr bool operator==(std::default_sentinel_t
const &)
const noexcept
141 constexpr bool operator!=(std::default_sentinel_t
const &)
const noexcept
147 constexpr friend bool operator==(std::default_sentinel_t
const &, out_file_iterator
const & it)
noexcept
149 return (it == std::default_sentinel);
153 constexpr friend bool operator!=(std::default_sentinel_t
const &, out_file_iterator
const & it)
noexcept
155 return (it != std::default_sentinel);