Boost logo

Boost Users :

Subject: [Boost-users] passing pointer as function arg using boost::bind
From: Lane (software.research.development_at_[hidden])
Date: 2014-03-20 23:08:28


I'm having a problem passing a pointer as an arg via boost::bind and was
hoping anyone could help out. I was able to pass 'a' just fine, but the
second arg 'b' I'm having a problem with.

Here is what I have.

--
namespace NS {
class MyThread {
    int doIt(NS::A a, B *b);
// ...
 A a;
B *b = new B();
NS::MyThread f_thread;
boost::thread workerThread(boost::bind(&NS::MyThread::doIt, &f_thread,
    boost::ref(a), boost::ref(b)));
Any help much appreciated.


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