boost::function extension