Efficient method of passing callback member function
问题 I'm designing a method for an input handler class. Here is some pseudo code... void InputHandler::ScanEvents( boost::function1< void, std::string& > &func ) { // Scan keys, determining string to pass // If string found, call func with string as its argument on object tied to func } I'm not exactly sure how to implement this, or if it is even possible, since the whole point of a function is to separate it from its caller. The idea is that an object has a private member function and a boost: