Boost logo

Boost Users :

Subject: Re: [Boost-users] pow math function and bind in boost::lambda
From: Roman Perepelitsa (roman.perepelitsa_at_[hidden])
Date: 2009-11-30 05:30:23


2009/11/30 Conoscenza Silente <abruzzoforteegentile_at_[hidden]>

> Hi All
> I tried to use pow function from <cmath> in a lamda function using
> boost::lamdba.
> Below the piece of code I used.
> Do you know what is wrong with it?
> Thank you very much.
> CS
>
> double l_tmp;
> double p_tmp;
>
> constant_type<double>::type h( constant(2.3) );
> constant_type<double>::type g( constant(1.2) );
>
> var_type<double>::type tmp( var(l_tmp) );
> var_type<double>::type pow_tmp( var(p_tmp) );
>
> std::for_each( x.begin(), x.end(),(
> tmp = 10,
> pow_tmp = boost::lambda::bind( pow, tmp - h - g , 3.15 )
> ));
>

Does it compile? If not, can you post an error message? If it compiles, do
you encounter any problems in run time?

Roman Perepelitsa.



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