|
Boost Users : |
Subject: [Boost-users] [phoenix][units] make boost.phoenix play well with boost.units
From: alfC (alfredo.correa_at_[hidden])
Date: 2010-06-03 06:11:59
I have and expression of type
arg1*arg1
which is contained in a deduced type LambdaExp (more preciselly
composite<multiplies_eval,vector<argument<0>, argument<0> >)
when trying to see what is the phoenix-deduced return type when input
is double
typename LambdaExp::template result<basic_environment<double> >::type
naturally, it gives 'double' (double*double)
but when the input type is a boost::units::quantity
typename LambdaExp::template
result<basic_environment<quantity<si::length> > >::type
it gives:
error_cant_deduce_type
(instread of the equivalent of quantity<si::area>, like in
quantity<si::area> a = quantity<si::length>()*quantity<si::length>() )
this is strange since it seemed that Phoenix worked out of the box
with Units.
What is going on? How can we help Phoenix deduce the return type?
Does Phoenix need this help, like Boost.Lambda does by means of boost/
units/lambda.hpp?
Thank you,
Alfredo
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