Boost logo

Boost Users :

Subject: Re: [Boost-users] function<double(double)> - cmath
From: Kulti (kultihell_at_[hidden])
Date: 2011-03-19 04:38:35


On Sat, Mar 19, 2011 at 2:18 AM, er <er.ci.2020_at_[hidden]> wrote:
> Simply bringing this to the attention of the function maintainer, in case it
> hasn't been mentioned before, and it has any relevance (I can live with it).
>
>  #include <cmath>
>  #include <boost/function.hpp>
>  typedef function<double(double)> f_;
>
> // error C2440 with MSVC 2010. No such problems with GCC 4.2
>  f_ f = log10;
>
>  typedef double(*fp)(double);
>  f_ f = fp( log10 ); // clumsy, but solves it
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>

Probably you need to use boost::bind?


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