#include <algorithm>
#include <iostream>
#include <vector>

bool is_even(int value) {
    return value % 2 == 0;
}

int main() {
    const std::vector<int> values{1, 2, 3, 4};
    const std::vector<int> empty{};
    const auto even = [](int value) { return value % 2 == 0; };
    std::cout << std::count_if(values.begin(), values.end(), is_even) << '\n';
    std::cout << std::count_if(values.begin(), values.end(), even) << '\n';
    std::cout << std::count_if(empty.begin(), empty.end(), is_even) << '\n';
    std::cout << std::count_if(empty.begin(), empty.end(), even) << '\n';
    return 0;
}
