Range algorithms, views, and actions for the Standard Library
ranges::view::filter_fn Struct Reference


Given a source range, unary predicate, and optional projection, present a view of the elements that satisfy the predicate.

+ Inheritance diagram for ranges::view::filter_fn:

Synopsis of methods

constexpr view< filter_fnfilter {}

Public Member Functions

template<typename Rng , typename Pred , typename Proj >
constexpr auto operator() (Rng &&rng, Pred pred, Proj proj) const -> filter_view< all_t< Rng >, composed< Pred, Proj >> requires ViewableRange< Rng > &&InputRange< Rng > &&IndirectUnaryPredicate< Pred, projected< iterator_t< Rng >, Proj >>
- Public Member Functions inherited from ranges::view::cpp20_filter_fn
template<typename Rng , typename Pred >
constexpr auto operator() (Rng &&rng, Pred pred) const -> filter_view< all_t< Rng >, Pred > requires ViewableRange< Rng > &&InputRange< Rng > &&IndirectUnaryPredicate< Pred, iterator_t< Rng >>