我想做类似的事情
template<typename InstanceType>
void add_test(void (InstanceType::* test_method )(void*),
std::tr1::shared_ptr<InstanceType> user_test_case)
{
boost::function<void ()> op;
op = boost::bind<InstanceType>(test_method, *user_test_case);
但它说:
1>d:\boost\boost/bind/mem_fn.hpp(359): error: a pointer to a bound function may only be used to call the function
1> return (t.*f_);
这里有什么问题?