14 #ifndef RANGES_V3_VIEW_FILTER_HPP
15 #define RANGES_V3_VIEW_FILTER_HPP
22 #include <range/v3/utility/static_const.hpp>
25 #include <range/v3/detail/prologue.hpp>
31 template<
typename Rng,
typename Pred>
36 : filter_view::remove_if_view{std::move(rng),
not_fn(std::move(pred))}
40 #if RANGES_CXX_DEDUCTION_GUIDES >= RANGES_CXX_DEDUCTION_GUIDES_17
41 template(
typename Rng,
typename Pred)(
43 view_<Rng> AND std::is_object<Pred>::value)
45 ->filter_view<views::all_t<Rng>, Pred>;
56 template(
typename Rng,
typename Pred)(
57 requires viewable_range<Rng> AND input_range<Rng> AND
69 using cpp20_filter_base_fn::operator();
71 template<
typename Pred>
72 constexpr
auto operator()(Pred pred)
const
74 return make_view_closure(
83 using cpp20_filter_base_fn::operator();
85 template(
typename Rng,
typename Pred,
typename Proj)(
86 requires viewable_range<Rng> AND input_range<Rng> AND
89 operator()(Rng && rng, Pred pred, Proj proj)
const
92 all(
static_cast<Rng &&
>(rng)),
93 compose(std::move(pred), std::move(proj))};
131 using filter_base_fn::operator();
133 template<
typename Pred>
134 constexpr
auto operator()(Pred pred)
const
139 template(
typename Pred,
typename Proj)(
140 requires (!range<Pred>))
141 constexpr
auto operator()(Pred pred, Proj proj)
const
143 return make_view_closure(
159 template(
typename V,
typename Pred)(
161 view_<V> AND std::is_object<Pred>::value)
167 #include <range/v3/detail/epilogue.hpp>
168 #include <range/v3/detail/satisfy_boost_range.hpp>
CPP_concept indirect_unary_predicate
\concept indirect_unary_predicate
Definition: concepts.hpp:632
decltype(begin(declval(Rng &))) iterator_t
Definition: access.hpp:698
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
defer< bind_back, Fn, Ts... > bind_back
Definition: meta.hpp:994
compose< quote< not_ >, Fn > not_fn
Logically negate the result of invocable Fn.
Definition: meta.hpp:3009
Definition: compose.hpp:33
Definition: filter.hpp:33
Definition: remove_if.hpp:48
Given a source range and a unary predicate, present a view of the elements that satisfy the predicate...
Definition: filter.hpp:55
Definition: filter.hpp:68
Given a source range, unary predicate, and optional projection, present a view of the elements that s...
Definition: filter.hpp:82
Definition: filter.hpp:130