Boost logo

Boost Users :

Subject: Re: [Boost-users] warnings with boost::bind
From: Hansi (hansipet_at_[hidden])
Date: 2009-03-31 09:31:32


and what is the right way?

boost::function<bool (const A&)> func=boost::bind<bool>(&A::SetData,&a,_1);

and after that

func(b);

Igor R schrieb:
>> Another thing that I have seen now. The compiler crashes when I want to
>> assign it to:
>>
>> boost::function<bool (const A&)> func=boost::bind<bool>(&A::SetData,&a);
>>
>> What is wrong?
>
> MSVC crashes on args mismatch in bind. In your case SetData's should
> be of type B, not A.


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