20 namespace seqan3::detail
45 template <
typename file_type>
46 class 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.");
56 using value_type = void;
59 using reference = void;
61 using const_reference = void;
63 using size_type = void;
67 using pointer =
void *;
75 constexpr out_file_iterator() =
default;
78 constexpr out_file_iterator(out_file_iterator
const &) =
default;
80 constexpr out_file_iterator & operator=(out_file_iterator
const &) =
default;
82 constexpr out_file_iterator (out_file_iterator &&) =
default;
84 constexpr out_file_iterator & operator=(out_file_iterator &&) =
default;
86 ~out_file_iterator() =
default;
89 constexpr out_file_iterator(file_type & _host) noexcept :
97 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));
134 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 &,
148 out_file_iterator
const & it) noexcept
150 return (it == std::default_sentinel);
154 constexpr
friend bool operator!=(std::default_sentinel_t
const &,
155 out_file_iterator
const & it) noexcept
157 return (it != std::default_sentinel);