
17 Jul
2006
17 Jul
'06
11:43 p.m.
Steven,
Member functions have an implicit this parameter. When you use mem_fun
on void my_class::foo(void), you actually get a unary functor whose
parameter is of type my_class * const.
The boost::bind Matt mentioned sets that parameter, resulting in a
nullary functor. If you use a non-member (or class-static) void()
function, you would not need the bind.
On 7/17/06, Christian Henning
Please use a smart pointer.
Smart pointer is a valid suggestion, but would be more useful for the dynamically-allocated class, than for the boost::thread instance that the OP seems to want on the stack. ~ Scott McMurray