trouble with bind+signals

I'm relatively new to the boost library and I'm having a problem with
boost::signals and bind. I've reproduced the problem I'm hitting here.
c++:
typedef boost::signal

Brendan Miller wrote:
I'm relatively new to the boost library and I'm having a problem with boost::signals and bind. I've reproduced the problem I'm hitting here.
c++: typedef boost::signal
SigWMCreate; SigWMCreate sig; LPARAM x; boost::bind(boost::ref(sig), boost::ref(*this), _1)((LPCREATESTRUCT)(x));
[...]
My guess is that performing the cast creates an intermediary result that I'm not allowed to take a reference of. Is this the case?
You are right. A fix for this problem is available in the 1.34 branch and will be part of the next release; in the meantime, you can try replacing boost/bind/bind_template.hpp with this version: http://boost.cvs.sourceforge.net/boost/boost/boost/bind/bind_template.hpp?revision=1.7&view=markup and see whether this helps.

Thanks, the new header fixed my problem.
On 7/9/06, Peter Dimov
Brendan Miller wrote:
I'm relatively new to the boost library and I'm having a problem with boost::signals and bind. I've reproduced the problem I'm hitting here.
c++: typedef boost::signal
SigWMCreate; SigWMCreate sig; LPARAM x; boost::bind(boost::ref(sig), boost::ref(*this), _1)((LPCREATESTRUCT)(x));
[...]
My guess is that performing the cast creates an intermediary result that I'm not allowed to take a reference of. Is this the case?
You are right. A fix for this problem is available in the 1.34 branch and will be part of the next release; in the meantime, you can try replacing boost/bind/bind_template.hpp with this version:
http://boost.cvs.sourceforge.net/boost/boost/boost/bind/bind_template.hpp?revision=1.7&view=markup
and see whether this helps.
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
participants (2)
-
Brendan Miller
-
Peter Dimov