|
Boost Users : |
Subject: Re: [Boost-users] passing pointer as function arg using boost::bind
From: reminisc3_at_[hidden]
Date: 2014-03-20 23:17:45
From: Lane Sent: Thursday, March 20, 2014 11:08 PM To: boost-users@lists.boost.org Reply To: boost-users@lists.boost.org Subject: [Boost-users] passing pointer as function arg using boost::bind |
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 mailing list
Boost-users_at_[hidden]
http://lists.boost.org/mailman/listinfo.cgi/boost-users
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