It is also possible to assign class member functions to objects of type boost::function.
void hello(std::ostream &os)
os << "Hello, world!\n";
boost::function<void(world*, std::ostream&)> f = &world::hello;
When calling such a function, the first parameter passed indicates the particular object for which the function is called. Therefore, the first parameter after the open parenthesis inside the template definition must be a pointer to that particular class. The remaining parameters denote the signature of the corresponding member function.