// after
#include <optional>

std::optional<int>
find_even(const std::vector<int>& numbers)
{
    for (int n : numbers) {
        if (n % 2 == 0) {
            return n;
        }
    }
    return std::nullopt;
}

int main(void)
{
    const std::vector<int> numbers = {1, 2, 3, 4};
    const std::optional<int> even =
        find_even(numbers);
    if (!even.has_value()) {
        // error
    }

    return 0;
}
