|
Boost Users : |
Subject: Re: [Boost-users] A lambda and boost function problem. Can any one with kindness help me?
From: Igor R (boost.lists_at_[hidden])
Date: 2009-07-25 13:35:13
> class classA{
> ..................
> Â public:
> Â boost::function<double (const int& )> theunknownfunc;
> .........................
> and a member function in classA used such function:
> double classA::function1( int& q, const int& n){
> Â Â Â double result=0.0;
> Â Â Â int loopvalue=1, totaltime=thenumbern;
> Â Â Â int innern=1;
> Â (
> for_loop(var(loopvalue)=1,var(loopvalue)<=var(totaltime),++var(loopvalue), (var(result)+= (
> bind(&classA::theunknownfunc,this,_2)*bind(&classA::function2,this,_1,_2)), ++_2,_2%=_1)))Â (q,innern);
> Â Â Â return result;
> }
"theunknownfunc" doesn't seem to be a member function of A, so you
can't use "&classA::theunknownfunc" notation.
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