#include <filter.hpp>
|
template<typename Pred > |
constexpr auto | operator() (Pred pred) const |
|
| template (typename Pred, typename Proj)() const expr auto operator()(Pred pred |
|
| template (typename Rng, typename Pred, typename Proj)(AND input_range< Rng > AND 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 |
|
| template (typename Rng, typename Pred)(AND input_range< Rng > AND indirect_unary_predicate< Pred |
|
iterator_t< Rng > constexpr filter_view< all_t< Rng >, Pred > | operator() (Rng &&rng, Pred pred) const |
|
ranges::views::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.
Example
Output
Syntax
The output_range concept.
Parameters
filter_func
- Called once for each element of the input range
- Returns true for elements that should present in the output range
input_range
- The range of elements to filter
- Reference type:
T
output_range
- The range of filtered values
- Is either a
forward_range
or the concept satisfied by the input
- Is a
common_range
if the input is a common_range
- Is not a
sized_range
or borrowed_range
- Reference type:
T
◆ const
Proj proj ranges::views::filter_fn::const |
Initial value:{
return make_view_closure(
bind_back(filter_base_fn{}, std::move(pred), std::move(proj)))
The documentation for this struct was generated from the following file: