You have the wrong functor. The constructor must compare the value, and the operator () must complete the task:
struct IsEqual {
IsEqual(const size_t id) : id(id) {}
bool operator() (const Task& value) {
return (value._id == id);
}
size_t id;
};
source
share