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