Boost logo

Boost Users :

Subject: [Boost-users] function<double(double)> - cmath
From: er (er.ci.2020_at_[hidden])
Date: 2011-03-18 22:18:56


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 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