24 Ranges library [ranges]

24.7 Range adaptors [range.adaptors]

24.7.4 Filter view [range.filter]

24.7.4.1 Overview [range.filter.overview]

filter_­view presents a View of an underlying sequence without the elements that fail to satisfy a predicate.
[Example
:
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
]