|
Boost Users : |
Subject: [Boost-users] Compiler Error With boost::bind and boost::signals
From: KERSAM (kersam_at_[hidden])
Date: 2009-01-30 11:15:39
Hello.
I have a compiler error when I try to use boost::bind and boost::signals.
Here is the code:
--------------------
#include<boost/bind.hpp>
#include<boost/signals.hpp>
class MyBoostTest {
public:
void testFunction(int x, int y) {}
};
void doConnect() {
boost::signal2<void, int, int> signal;
signal.connect(boost::bind<void>(&MyBoostTest::testFunction, new
MyBoostTest, _1));
}
-----------------------------------
The compiler gives me the following error:
c:\3rdparty\boost\boost\bind.hpp(289) : error C2064: term does not evaluate
to a function taking 2 arguments
class does not define an 'operator()' or a user defined conversion
operator to a pointer-to-function or reference-to-function that takes
appropriate number of arguments
What am I doing wrong?
Regards
-- View this message in context: http://www.nabble.com/Compiler-Error-With-boost%3A%3Abind-and-boost%3A%3Asignals-tp21749564p21749564.html Sent from the Boost - Users mailing list archive at Nabble.com.
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