
9 Feb
2006
9 Feb
'06
7:26 p.m.
Sergey Lukin wrote:
Peter Dimov replied:
t.async_wait(boost::bind(Component::Method1, &y, 10, boost::bind (DPC::Print1, &x, 2), &t));
You need to prevent the inner bind from being treated as a subexpression of the outer bind. Either assign it to a function<>:
boost::function<void()> f = boost::bind( DPC::Print1, &x, 2 ); t.async_wait( boost::bind( Component::Method1, &y, 10, f ) ); or use boost::protect, as explained at the end of
I tried both suggested solutions but still have the same errors
boost::function<void(int)> f = boost::bind( DPC::Print1, &x, 2 );
The types above are incompatible, use what Peter suggested previously: boost::function<void()> f = boost::bind( DPC::Print1, &x, 2 ); Jeff Flinn