24 Ranges library [ranges]

24.7 Range adaptors [range.adaptors]

24.7.5 Filter view [range.filter]

24.7.5.1 Overview [range.filter.overview]

filter_­view presents a view of the elements of an underlying sequence that satisfy a predicate.
The name views​::​filter denotes a range adaptor object ([range.adaptor.object]).
Given subexpressions E and P, the expression views​::​filter(E, P) is expression-equivalent to filter_­view{E, P}.
[Example 1: vector<int> is{ 0, 1, 2, 3, 4, 5, 6 }; filter_view evens{is, [](int i) { return 0 == i % 2; }}; for (int i : evens) cout << i << ' '; // prints: 0 2 4 6 — end example]