Boost logo

Boost Users :

Subject: [Boost-users] A lambda and boost function problem. Can any one with kindness help me?
From: fmingu (fmingu_at_[hidden])
Date: 2009-07-25 02:59:35


I am using Dev-C++ 4.9.8.0 and lambda expression.
I builded a class and put it into a dll made by myself.
The dll will be used by else's programs which contain the functions that I do not know. All I know is just the function type.So I used the boost function library.
............
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;
}
.................
but the complier told me that:
instantiated from `RET boost::lambda::lambda_functor_base<boost::lambda::forloop_action, Args>::call(A&, B&, C&, Env&) const [with RET = void, A = int, B = int, C = const boost::tuples::null_type,<.............
 
instantiated from `T::sig<boost::tuples::tuple<A&, B&, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, ..............
instantiated from here
The user do not want to read the source code of mine since it is built with many lambda expressions. He just want to use the dll.
And I do not know how to solve it by using boost function library.
Can anyone with kindness help me?

 
 

 



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