17#if __cpp_lib_ranges >= 202110L
23using std::ranges::owning_view;
39template <std::ranges::range rng_t>
40 requires std::movable<rng_t> && (!seqan3::detail::is_type_specialisation_of_v<rng_t, std::initializer_list>)
49 requires std::default_initializable<rng_t>
62 constexpr rng_t &
base() &
noexcept
68 constexpr rng_t
const &
base() const & noexcept
74 constexpr rng_t &&
base() &&
noexcept
76 return std::move(rng);
80 constexpr rng_t
const &&
base() const && noexcept
82 return std::move(rng);
86 constexpr std::ranges::iterator_t<rng_t>
begin()
93 requires
std::ranges::range<rng_t const>
99 constexpr std::ranges::sentinel_t<rng_t>
end()
101 return std::ranges::end(rng);
105 constexpr auto end() const
106 requires
std::ranges::range<rng_t const>
108 return std::ranges::end(rng);
113 requires requires { std::ranges::empty(rng); }
115 return std::ranges::empty(rng);
120 requires requires { std::ranges::empty(rng); }
122 return std::ranges::empty(rng);
127 requires std::ranges::sized_range<rng_t>
134 requires
std::ranges::sized_range<rng_t const>
141 requires std::ranges::contiguous_range<rng_t>
143 return std::ranges::data(rng);
148 requires
std::ranges::contiguous_range<rng_t const>
150 return std::ranges::data(rng);
164 template <
typename t>
168 template <
typename t>
172 template <
typename t>
188 template <std::ranges::range rng_t>
189 requires decays_to_view<rng_t> || valid_for_ref_view<rng_t> || valid_for_owning_view<rng_t>
192 if constexpr (decays_to_view<rng_t>)
193 return std::forward<rng_t>(rng);
194 else if constexpr (valid_for_ref_view<rng_t>)
195 return std::ranges::ref_view{std::forward<rng_t>(rng)};
209template <std::ranges::range rng_t>
Provides seqan3::detail::adaptor_base and seqan3::detail::combined_adaptor.
CRTP-base to simplify the definition of range adaptor closure objects and similar types.
Definition: adaptor_base.hpp:77
constexpr adaptor_base(adaptor_base const &) noexcept=default
Defaulted.
The functor for seqan3::detail::all.
Definition: all_view.hpp:158
static constexpr bool decays_to_view
Checks whether a type is a view.
Definition: all_view.hpp:165
static constexpr bool valid_for_owning_view
Checks whether a type could be used for seqan3::detail::owning_view.
Definition: all_view.hpp:173
static constexpr bool valid_for_ref_view
Checks whether a type could be used for std::ranges::ref_view.
Definition: all_view.hpp:169
static auto impl(rng_t &&rng)
Returns a view that includes all elements of the range argument.
Definition: all_view.hpp:190
A move-only view that takes unique ownership of a range.
Definition: all_view.hpp:42
constexpr rng_t & base() &noexcept
Returns the range.
Definition: all_view.hpp:62
constexpr rng_t && base() &&noexcept
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition: all_view.hpp:74
constexpr auto size() const
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition: all_view.hpp:133
constexpr auto size()
Returns the size of the range.
Definition: all_view.hpp:126
constexpr auto data() const
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition: all_view.hpp:147
constexpr std::ranges::iterator_t< rng_t > begin()
Return the begin iterator of the range.
Definition: all_view.hpp:86
constexpr auto begin() const
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition: all_view.hpp:92
constexpr auto data()
Returns the raw data pointer of the range.
Definition: all_view.hpp:140
constexpr std::ranges::sentinel_t< rng_t > end()
Return the end iterator of the range.
Definition: all_view.hpp:99
owning_view()=default
Defaulted.
constexpr rng_t const && base() const &&noexcept
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition: all_view.hpp:80
constexpr auto end() const
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition: all_view.hpp:105
constexpr bool empty()
Checks whether the range is empty.
Definition: all_view.hpp:112
constexpr rng_t const & base() const &noexcept
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition: all_view.hpp:68
constexpr bool empty() const
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition: all_view.hpp:119
decltype(all(std::declval< rng_t >())) all_t
Returns the type that results from appying seqan3::detail::all to a range.
Definition: all_view.hpp:210
constexpr auto all
Returns a view that includes all elements of the range argument.
Definition: all_view.hpp:204
constexpr size_t size
The size of a type pack.
Definition: type_pack/traits.hpp:146
The internal SeqAn3 namespace.
Definition: aligned_sequence_concept.hpp:29
SeqAn specific customisations in the standard namespace.
Provides type traits for working with templates.