44 struct RANGES_EMPTY_BASES remove_if_view
45 : view_adaptor<remove_if_view<Rng, Pred>, Rng,
46 is_finite<Rng>::value ? finite : range_cardinality<Rng>::value>
47 ,
private box<semiregular_box_t<Pred>>
49 remove_if_view() =
default;
50 constexpr remove_if_view(Rng rng, Pred pred)
51 : remove_if_view::view_adaptor{detail::move(rng)}
52 , remove_if_view::box(detail::move(pred))
58 struct adaptor : adaptor_base
61 constexpr adaptor(remove_if_view * rng) noexcept
70 RANGES_ASSERT(it != ranges::end(rng_->base()));
71 rng_->satisfy_forward(++it);
78 rng_->satisfy_reverse(it);
80 void advance() =
delete;
81 void distance_to() =
delete;
84 remove_if_view * rng_;
86 constexpr adaptor begin_adaptor()
92 constexpr auto end_adaptor()
const noexcept
93 -> CPP_ret(adaptor_base)(
99 constexpr auto end_adaptor()
110 auto const last = ranges::end(this->base());
111 auto & pred = this->remove_if_view::box::get();
112 while(it != last && invoke(pred, *it))
117 RANGES_ASSERT(begin_);
118 auto const & first = *begin_;
119 auto & pred = this->remove_if_view::box::get();
122 RANGES_ASSERT(it != first);
125 }
while(invoke(pred, *it));
128 constexpr void cache_begin()
132 auto it = ranges::begin(this->base());
134 begin_.emplace(std::move(it));
137 detail::non_propagating_cache<iterator_t<Rng>> begin_;
RANGES_INLINE_VARIABLE(detail::to_container_fn< detail::from_range< std::vector > >, to_vector) template< template< typename... > class ContT > auto to(RANGES_HIDDEN_DETAIL(detail
For initializing a container of the specified type with the elements of an Range.
Definition conversion.hpp:399
Given a source range, unary predicate, and optional projection, present a view of the elements that d...
Definition remove_if.hpp:152