This makes the object "callable" as a function. Unlike a function, an object can contain state. In fact, a function can do this in a weak sense, using a static local, but then a static local constant is present there for any call to this function executed in any context by any thread.
When an object acts as a function, the state is only a member of this object, and you can have other objects of the same class that have their own set of member variables.
At the heart of this concept is the completeness of boost :: bind (which was based on old STL binders).
The function has a fixed signature, but often you need more parameters than are actually passed in the signature to perform the action.
source share