find_if in set in C++: unresolved overloaded function type
问题 I have used find_if before with lists and vectors in C++ and it has worked fine. But now, when I try to use it with sets I get the following error: error: no matching function for call to ‘find_if(std::set<A, Acmp>::iterator, std::set<A, Acmp>::iterator, <unresolved overloaded function type>)’| My class is the following: bool searchForA(A i) { return (i.getVal() > 0); } void B::findA() { set<A, Acmp> cont; set<A, Acmp>::iterator it; A *a1 = new A(5); A *a2 = new A(7); cont.insert(*a1); cont