Boost logo

Boost Users :

Subject: Re: [Boost-users] Compiler Error With boost::bind and boost::signals
From: KERSAM (kersam_at_[hidden])
Date: 2009-01-30 11:16:04


I forgot:
I am using the Microsoft (R) 32-bit C/C++ Optimizing Compiler Version
14.00.50727.762 for 80x86 and Boost Version 1.35.

KERSAM wrote:
>
> 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-tp21749564p21749635.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