Boost logo

Boost Users :

Subject: Re: [Boost-users] [lambda] helping lambda to deduce return type and then avoid 'ret<T>'
From: alfC (alfredo.correa_at_[hidden])
Date: 2010-05-28 20:50:33


On May 24, 5:05 pm, OvermindDL1 <overmind..._at_[hidden]> wrote:
> On Mon, May 24, 2010 at 2:51 PM, Matthias Schabel
> > You should take a look at <boost/units/lambda.hpp> - Torsten Maehne contributed it to deal with interplay betweenlambdaandunits... Something similar might be worthwhile with interval as well.
>
> or Boost.Phoenix, it handles such things better.

OvermindDL1, you are right,
while lambda with units needs to explicitly to #include<boost/units/
lambda.hpp>
boost phoenix works out of the box

        cout<< (boost::lambda::_1+boost::lambda::_1)(energy) <<endl; //
needs #include "boost/units/lambda.hpp"
        cout<< (boost::phoenix::arg_names::arg1 +
boost::phoenix::arg_names::arg1)(energy) <<endl;


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