- The 1st template argument of
bind
is the return type. So, it should bevoid
. Or just omit it. boost::function
signature doesn't match the one of the bound function. Make itfunction<void(void *)>
.- The functor you create should accept 1 argument, so provide the appropriate argument placeholder.
- Finally, you can bind to the
shared_ptr
, directly.
The bottom line: boost::function<void (void *)> op = boost::bind(test_method, user_test_case, _1);