102template <
typename underlying_adaptor_t>
103class deep :
public detail::adaptor_base<deep<underlying_adaptor_t>, underlying_adaptor_t>
107 using base_type = detail::adaptor_base<deep<underlying_adaptor_t>, underlying_adaptor_t>;
116 constexpr deep() noexcept = default;
119 constexpr
deep & operator=(
deep const &) noexcept = default;
120 constexpr
deep & operator=(
deep &&) noexcept = default;
123 using base_type::base_type;
129 using base_type::operator();
138 template <
std::ranges::input_range urng_t, typename underlying_adaptor_t_>
139 static constexpr auto impl(urng_t && urange, underlying_adaptor_t_ && adap)
141 return std::forward<urng_t>(urange) | std::forward<underlying_adaptor_t_>(adap);
154 template <std::ranges::input_range urng_t>
155 requires std::ranges::input_range<std::ranges::range_reference_t<urng_t>>
156 constexpr auto operator()(urng_t && urange)
const &
158 return std::forward<urng_t>(urange) |
159 std::views::transform([me = *
this](
auto && e) {
return std::forward<decltype(e)>(e) | me; });
163 template <std::ranges::input_range urng_t>
164 requires std::ranges::input_range<std::ranges::range_reference_t<urng_t>>
165 constexpr auto operator()(urng_t && urange) &&
167 return std::forward<urng_t>(urange) |
168 std::views::transform([me = std::move(*
this)](
auto && e) {
return std::forward<decltype(e)>(e) | me; });
179 template <
typename first_arg_t,
typename... stored_arg_types>
180 requires(!std::ranges::input_range<first_arg_t>)
181 constexpr auto operator()(first_arg_t && first, stored_arg_types &&... args)
const
186 auto adaptor_closure =
187 std::get<0>(this->arguments)(std::forward<first_arg_t>(first), std::forward<stored_arg_types>(args)...);
189 return deep<
decltype(adaptor_closure)>{std::move(adaptor_closure)};
193 constexpr auto operator()()
const
198 auto adaptor_closure = std::get<0>(this->arguments)();
200 return deep<
decltype(adaptor_closure)>{std::move(adaptor_closure)};
215 template <std::ranges::input_range urng_t,
typename... stored_arg_types>
216 requires(
sizeof...(stored_arg_types) > 0)
217 constexpr auto operator()(urng_t && urange, stored_arg_types &&... args)
const
219 auto adaptor_closure = std::get<0>(this->arguments)(std::forward<stored_arg_types>(args)...);
220 return std::forward<urng_t>(urange) | std::move(adaptor_closure);
229template <
typename underlying_adaptor_t>
A wrapper type around an existing view adaptor that enables "deep view" behaviour for that view.
Definition: deep.hpp:104
deep(underlying_adaptor_t &&inner) -> deep< underlying_adaptor_t >
Template argument deduction helper that preserves lvalue references and turns rvalue references into ...
constexpr deep() noexcept=default
Defaulted.
The BioC++ namespace for views.
Auxiliary header for the views submodule .