Boost logo

Boost Users :

Subject: Re: [Boost-users] phoenix bind template parameter
From: Nate Crookston (nathan.crookston_at_[hidden])
Date: 2014-12-06 08:05:47

Hi Phil,

Since std::pow has a few different overloads (for things like long double
std::complex, etc.) you're probably running into the problem described
here: <>
 The solution it suggests will work in your case.

Happily, phoenix makes it easy to call cmath functions by wrapping them in
this file:
So you should be able to call pow without messing with bind.


On Wed, Dec 3, 2014 at 1:34 PM, Philipp Kraus <philipp.kraus_at_[hidden]>

> Hello,
> I try to use phoenix bind to bind std::pow for double values, but I get
> errors, because the template parameters not set:
> phoenix::bind(&std::pow, _val, _1)
> I would like to compile it with C++11. How can I setup the template
> parameter on the phoenix bind?
> At the moment I have defined a function double mypow(double a, double b) {
> return std::pow(a,b); }
> but can I do this directly with std::pow in the bind call?
> Thanks a lot
> Phil
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at