17 Jul
2006
17 Jul
'06
6:15 p.m.
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