yeah std::find_if could help in theory, however it would require introducing of an "unary predicate" function.