Boost logo

Boost Users :

Subject: Re: [Boost-users] Compiler Error With boost::bind and boost::signals
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2009-01-30 12:42:11


AMDG

KERSAM wrote:
>> class MyBoostTest {
>> public:
>> void testFunction(int x, int y) {}
>> };
>>
>> signal.connect(boost::bind<void>(&MyBoostTest::testFunction, new
>> MyBoostTest, _1));
>>
>>
>> What am I doing wrong?
>>

testFunction needs three arguments, the class instance, x, and y.
add _2 to the parameters for boost::bind.

In Christ,
Steven Watanabe


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