Boost logo

Boost Users :

Subject: [Boost-users] [phoenix] [cmath] lazy pow not working in boost 1.48
From: alfC (alfredo.correa_at_[hidden])
Date: 2012-01-21 22:41:27


Hi,

 Is this a bug in phoenix? the boost::phoenix::pow lazy function doesn't
seem to work. My version is Boost 1.48 or maybe 1.49 (after svn update) --
Thanks, Alfredo

#include<iostream>
#include <boost/phoenix.hpp>
#include <boost/phoenix/stl/cmath.hpp>

using std::clog; using std::endl;
int main(){
    using namespace boost::phoenix::arg_names;
    clog << boost::phoenix::sin(arg1)(1.) << " " << std::sin(1.) << endl;
// ok
    clog << boost::phoenix::pow(arg1, arg1)(2.) << " " << std::pow(2.,2.)
<< endl;
    // ^^^^------ error: no matching function for call to ‘pow(const
boost::phoenix::expression::argument<1>::type&, double)
    return 0;
}



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