29 template <
typename left_adaptor_t,
typename right_adaptor_t>
30 class combined_adaptor;
77 template <
typename derived_type,
typename ...stored_args_ts>
85 template <
typename urng_t,
size_t... Is>
91 std::forward<urng_t>(urange),
96 template <
typename urng_t,
size_t... Is>
101 std::forward<urng_t>(urange),
122 noexcept(noexcept(
std::tuple<stored_args_ts...>{std::forward<stored_args_ts>(args)...})) :
123 arguments{std::forward<stored_args_ts>(args)...}
128 template <std::ranges::input_range urng_t>
135 template <std::ranges::input_range urng_t>
138 return std::move(*this).pass_args_to_impl(std::forward<urng_t>(urange),
153 template <
typename arg_t>
156 if constexpr (std::ranges::input_range<arg_t>)
157 return me(std::forward<arg_t>(arg));
163 template <
typename arg_t>
166 if constexpr (std::ranges::input_range<arg_t>)
167 return std::move(me)(std::forward<arg_t>(arg));
188 template <
typename arg_t>
195 template <
typename arg_t>
216 template <
typename left_adaptor_t,
typename right_adaptor_t>
218 public adaptor_base<combined_adaptor<left_adaptor_t, right_adaptor_t>,
232 template <std::ranges::input_range urng_t,
233 typename left_adaptor_t_,
234 typename right_adaptor_t_>
235 static auto impl(urng_t && urange, left_adaptor_t_ && left_adaptor, right_adaptor_t_ && right_adaptor)
237 return std::forward<urng_t>(urange)
238 | std::forward<left_adaptor_t_>(left_adaptor)
239 | std::forward<right_adaptor_t_>(right_adaptor);
258 base_type{std::forward<left_adaptor_t>(l), std::forward<right_adaptor_t>(r)}
290 template <
template <
typename,
typename ...>
typename view_type>
306 template <
typename ...arg_types>
307 static auto impl(arg_types && ... args)
309 return view_type{std::forward<arg_types>(args)...};
368 template <typename functor_type, typename ...stored_args_ts>
389 template <std::ranges::input_range urng_t>
390 constexpr
auto impl(urng_t && urange, stored_args_ts ... args)
const
392 return fun(std::forward<urng_t>(urange), std::forward<stored_args_ts>(args)...);
CRTP-base to simplify the definition of range adaptor closure objects and similar types.
Definition: detail.hpp:79
constexpr auto operator()(urng_t &&urange) &&
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition: detail.hpp:136
std::tuple< stored_args_ts... > arguments
Stores the arguments.
Definition: detail.hpp:82
constexpr adaptor_base(adaptor_base &&) noexcept=default
Defaulted.
constexpr friend auto operator|(arg_t &&arg, derived_type &&me)
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition: detail.hpp:164
constexpr adaptor_base(adaptor_base const &) noexcept=default
Defaulted.
constexpr auto operator()(urng_t &&urange) const &
Function-style overload for ranges.
Definition: detail.hpp:129
constexpr auto pass_args_to_impl(urng_t &&urange, std::index_sequence< Is... > const &) &&
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition: detail.hpp:97
constexpr friend auto operator|(adaptor_base const &me, arg_t &&arg)
Right-hand-side pipe operator that handles composing.
Definition: detail.hpp:189
constexpr auto pass_args_to_impl(urng_t &&urange, std::index_sequence< Is... > const &) const &
Helper function to unpack the tuple and delegate to the derived type.
Definition: detail.hpp:86
constexpr friend auto operator|(arg_t &&arg, derived_type const &me)
Left-hand-side pipe operator that handles range input or composing.
Definition: detail.hpp:154
friend derived_type
Befriend the derived_type so it can access private members if need be.
Definition: detail.hpp:107
constexpr friend auto operator|(adaptor_base &&me, arg_t &&arg)
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition: detail.hpp:196
Template for range adaptor closure objects that store no arguments and always delegate to the view co...
Definition: detail.hpp:292
constexpr adaptor_for_view_without_args(adaptor_for_view_without_args const &) noexcept=default
Defaulted.
friend base_type
Befriend the base class so it can call impl().
Definition: detail.hpp:298
static auto impl(arg_types &&... args)
Call the view's constructor with the given arguments (all of the base class'es operators ultimately r...
Definition: detail.hpp:307
constexpr adaptor_for_view_without_args(adaptor_for_view_without_args &&) noexcept=default
Defaulted.
constexpr adaptor_for_view_without_args()=default
Defaulted.
Template for range adaptor closure objects that store arguments and wrap a proto-adaptor.
Definition: detail.hpp:371
functor_type fun
The stored functor, usually a "proto-adaptor".
Definition: detail.hpp:380
friend base_type
Befriend the base class so it can call impl().
Definition: detail.hpp:377
constexpr adaptor_from_functor(adaptor_from_functor const &) noexcept=default
Defaulted.
constexpr adaptor_from_functor()=default
Defaulted.
constexpr auto impl(urng_t &&urange, stored_args_ts ... args) const
Delegate the range argument and stored arguments to the wrapped functor.
Definition: detail.hpp:390
constexpr adaptor_from_functor(adaptor_from_functor &&) noexcept=default
Defaulted.
Template for range adaptor closure objects that consist of two other range adaptor closure objects.
Definition: detail.hpp:221
static auto impl(urng_t &&urange, left_adaptor_t_ &&left_adaptor, right_adaptor_t_ &&right_adaptor)
Combine all arguments via operator|.
Definition: detail.hpp:235
constexpr combined_adaptor(combined_adaptor const &) noexcept=default
Defaulted.
friend base_type
Befriend the base class so it can call impl().
Definition: detail.hpp:229
constexpr combined_adaptor()=default
Defaulted.
constexpr combined_adaptor(combined_adaptor &&) noexcept=default
Defaulted.
Provides various transformation traits used by the range module.
auto const move
A view that turns lvalue-references into rvalue-references.
Definition: move.hpp:70
The internal SeqAn3 namespace.
Definition: aligned_sequence_concept.hpp:29
SeqAn specific customisations in the standard namespace.
Adaptations of concepts from the Ranges TS.
Provides various type traits on generic types.