|
Boost Users : |
From: King, Steven R (steven.r.king_at_[hidden])
Date: 2006-07-17 14:15:23
Hello All,
Newbie question, thanks for your patience.
I'm trying to pass a member function as the callback in boost::thread.
Given this:
class my_class
{
...
void foo(void);
...
};
Instincts told me to do this:
boost::thread my_thread( std::mem_fun(&my_class::foo) );
That didn't work and I discovered that boost::thread expects a
boost::function0<void> instead.
Can somebody please help me bridge the gap between std::mem_fun and
boost::function0?
I'm using gcc 4.1 on Linux and Boost 1.33.1
Cheers,
-steve
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