#include <range/v3/view/filter.hpp>
Public Member Functions | |
template<typename Pred > | |
constexpr auto | operator() (Pred pred) const |
template<typename Pred , typename Proj > requires (!range<Pred>) | |
constexpr auto | operator() (Pred pred, Proj proj) const |
Public Member Functions inherited from ranges::views::filter_base_fn | |
template<typename Rng , typename Pred , typename Proj > requires viewable_range<Rng> && input_range<Rng> && indirect_unary_predicate<Pred, projected<iterator_t<Rng>, Proj>> | |
constexpr filter_view< all_t< Rng >, composed< Pred, Proj > > | operator() (Rng &&rng, Pred pred, Proj proj) const |
Public Member Functions inherited from ranges::views::cpp20_filter_base_fn | |
template<typename Rng , typename Pred > requires viewable_range<Rng> && input_range<Rng> && indirect_unary_predicate<Pred, iterator_t<Rng>> | |
constexpr filter_view< all_t< Rng >, Pred > | operator() (Rng &&rng, Pred pred) const |
Related Functions | |
(Note that these are not member functions.) | |
constexpr filter_fn | filter {} |
The filter view takes in a predicate function T -> bool
and converts an input range of T
into an output range of T
by keeping all elements for which the predicate returns true.
filter_func
input_range
T
output_range
forward_range
or the concept satisfied by the inputcommon_range
if the input is a common_range
sized_range
or borrowed_range
T