As you noticed, you don't actually know what type to expect, because there could in fact be a multitude of types that satisfy what you need. You could be specific and require a std::function<bool(Object*)>. (This method essentially performs type erasure, so that your findObject function doesn't need to care what the actual type is.) But that comes with a runtime cost and a somewhat less flexible interface.
Assuming there isn't some other difficulty that would prevent this, the typical solution to this type of problem is to use templates. You'll accept any type whatsoever, as long as it satisfies your needs. In this case, you need what std::find_if needs: it should be callable, taking an Object pointer as its only parameter, and returning a bool. Try this out:
class Container
{
public:
template <typename TComparator>
Object* findObject(TComparator compare);
private:
std::vector<Object*> objectList_;
};
template <typename TComparator>
Object* Container::findObject(TComparator compare)
{
auto itr = std::find_if(objectList_.begin(), objectList_.end(), compare);
return (itr != objectList_.end()) ? *itr : nullptr;
}
Note that this would all need to be inside your header file, because templates cannot be compiled independently of the calling code, since the types aren't known until a piece of code makes the call. Therefore the calling code actually needs full access to the source code in order to compile it. However, once you get an iterator by calling std::find_if, if you still had a substantial amount of code to execute before returning a value, you could then call into another private member function that is defined in a .cpp file like normal, and thus keep the template bloat within your header file to a minimum.
(I used C++11 keywords auto and nullptr in the above code. Depending on your compiler, you might need to switch back to fully specifying the type instead of using auto, and then returning NULL or 0 instead of nullptr.)
"We should have a great fewer disputes in the world if words were taken for what they are, the signs of our ideas only, and not for things themselves." - John Locke