45 template <std::ranges::input_range urng_t>
46 class view_persist :
public std::ranges::view_interface<view_persist<urng_t>>
89 return std::ranges::begin(*
urange);
98 return std::ranges::cbegin(*
urange);
116 return std::ranges::end(*
urange);
125 return std::ranges::cend(*
urange);
132 template <
typename urng_t>
150 using base_t::base_t;
159 template <std::ranges::viewable_range urng_t>
160 static auto impl(urng_t && urange)
162 return std::views::all(std::forward<urng_t>(urange));
168 template <std::ranges::range urng_t>
169 static auto impl(urng_t && urange)
171 static_assert(!std::is_lvalue_reference_v<urng_t>,
"BUG: lvalue-reference in persist_fn::impl().");
Adaptations of algorithms from the Ranges TS.
CRTP-base to simplify the definition of range adaptor closure objects and similar types.
Definition: detail.hpp:79
[adaptor_def]
Definition: persist.hpp:143
friend base_t
Befriend the base class so it can call impl().
Definition: persist.hpp:154
static auto impl(urng_t &&urange)
For ranges that are viewable, delegate to std::views::all.
Definition: persist.hpp:160
The type returned by seqan3::views::persist.
Definition: persist.hpp:47
auto end() noexcept
Returns an iterator to the element following the last element of the range.
Definition: persist.hpp:114
view_persist(urng_t &&) -> view_persist< std::remove_reference_t< urng_t >>
Template argument type deduction guide that strips references.
auto end() const noexcept
Returns an iterator to the element following the last element of the range.
Definition: persist.hpp:120
auto begin() const noexcept
Returns an iterator to the first element of the container.
Definition: persist.hpp:93
std::shared_ptr< urng_t > urange
Shared storage of the underlying range.
Definition: persist.hpp:50
auto begin() noexcept
Returns an iterator to the first element of the container.
Definition: persist.hpp:87
view_persist() noexcept=default
Defaulted.
Provides various transformation traits used by the range module.
constexpr auto persist
A view adaptor that wraps rvalue references of non-views.
Definition: persist.hpp:233
auto const move
A view that turns lvalue-references into rvalue-references.
Definition: move.hpp:70
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 internal SeqAn3 namespace.
Definition: aligned_sequence_concept.hpp:29
The SeqAn namespace for views.
Additional non-standard concepts for ranges.
Adaptations of concepts from the standard library.
Auxiliary header for the views submodule .
Adaptations of concepts from the Ranges TS.