functor vs function pointer