
5 Mar
2010
5 Mar
'10
4:02 a.m.
By the way, I think the use of boost::function is redundant. Doesn't it just work like this:
boost::thread(my_thread, "bla", "lala");
I wanted to give a simple example; in reality my_thread() is a method and I use something like: boost::thread(boost::function<void (SomeClass*, std::string const&, std::string const&)>(&SomeClass::my_thread, this, "bla", "lala"); Is the use of Boost.Function also redundant in this case? I could use either Boost.Bind or Boost.Lambda, but I think Boost.Function is more lightweight than either. Can I instantiate boost::function with an object reference rather than a an object pointer?