But this will not use the operator< that you have above because the types does not match.
Thanks for the fast reply, so as a clarification you can use a pointer to an object or the object itself as input for the std::greater function object?
Object * foo = ...
Object * bar = ...
bool result = (foo > bar);
A: It will not call Object::operator>
Of course you could make: bool myfunction (Object * lhs, Object * rhs) { return (*lhs > *rhs); }
(Or same as lambda.) But then you don't need that std::greater.