Moved from std::function to boost::function.