Boost logo

Boost Users :

From: me22 (me22.ca_at_[hidden])
Date: 2006-07-17 19:43:11


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 <chhenning_at_[hidden]> wrote:
> 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


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net