26 namespace seqan3::detail
44 template <std::ranges::input_range urng_t>
45 class view_persist :
public std::ranges::view_interface<view_persist<urng_t>>
55 view_persist() noexcept = default;
56 constexpr view_persist(view_persist const & rhs) noexcept = default;
57 constexpr view_persist(view_persist && rhs) noexcept = default;
58 constexpr view_persist & operator=(view_persist const & rhs) noexcept = default;
59 constexpr view_persist & operator=(view_persist && rhs) noexcept = default;
60 ~view_persist() noexcept = default;
65 view_persist(urng_t && _urange) :
92 auto begin() const noexcept
115 return std::ranges::end(*urange);
119 auto end() const noexcept
124 return std::ranges::cend(*urange);
131 template <
typename urng_t>
132 view_persist(urng_t &&) -> view_persist<std::remove_reference_t<urng_t>>;
141 class persist_fn :
public adaptor_base<persist_fn>
145 using base_t = adaptor_base<persist_fn>;
149 using base_t::base_t;
158 template <std::ranges::viewable_range urng_t>
159 static auto impl(urng_t && urange)
161 return std::views::all(std::forward<urng_t>(urange));
167 template <std::ranges::range urng_t>
168 static auto impl(urng_t && urange)
170 static_assert(!std::is_lvalue_reference_v<urng_t>,
"BUG: lvalue-reference in persist_fn::impl().");
227 inline auto constexpr
persist = persist_fn{};
233 #ifdef SEQAN3_DEPRECATED_310
Provides seqan3::detail::adaptor_base and seqan3::detail::combined_adaptor.
Adaptations of algorithms from the Ranges TS.
Provides various transformation traits used by the range module.
constexpr auto persist
A view adaptor that wraps rvalue references of non-views.
Definition: persist_view.hpp:241
auto const move
A view that turns lvalue-references into rvalue-references.
Definition: move.hpp:74
Specifies requirements of an input range type for which the const version of that type satisfies the ...
Provides exceptions used in the I/O module.
Provides various transformation traits for use on iterators.
The SeqAn namespace for views.
Definition: char_to.hpp:22
Adaptations of concepts from the Ranges TS.
Additional non-standard concepts for ranges.