How Do They Work?
The functor classes overload operator() to supply a function call operator that invokes the encapsulated function. When the caller calls the functor, the syntax is identical to a function invocation.
What we have, then, is a caller, some software routine that invokes the functor, and a callee, the software that provides the function encapsulated by the functor. Any place you would want to pass a function pointer to the caller, you can pass a functor. If necessary, the functor can adapt the callee function to the signature that the caller expects.
The functor cannot make every function fit, but with the help of a binder object, it can deal with extra arguments, a return value when none is wanted, and a less than exact match in argument and return types.
For example, suppose the calling routine needs to call various functions with one argument value of type char and to receive a double in return. The routine can be written to call a functor type that takes one argument and returns a value, in this case RWTFunctor <double(char)>. This is all the caller has to do. Everything else is the callee's responsibility