Boost logo

Boost Users :

Subject: Re: [Boost-users] lambda/bind compiler error
From: Suresh Kumar (suresh.amritapuri_at_[hidden])
Date: 2010-09-28 16:38:36


On Tue, Sep 28, 2010 at 1:27 PM, Eric MALENFANT <
Eric.Malenfant_at_[hidden]> wrote:

> De : Igor R
> > De: Suresh Kumar>
> > > #include <boost/lambda/lambda.hpp>
> > > #include <boost/lambda/bind.hpp>
> > > #include <cmath>
> > > #include <iostream>
> > > using namespace boost::lambda;
> > > using namespace std;
> > > int main(){
> > > cout << (bind(fabs,(_1-_2)))(2,3) << endl;
> > > //to print the abs diff of 2 arguments
> > > }
> >
> > First of all, doesn't fabs have several overloads?
>
> There is also:
> http://www.boost.org/doc/libs/1_43_0/doc/html/lambda/le_in_details.html#lambda.rvalues_as_actual_arguments
>
>
But then how to go about?
suresh

-- 
R Suresh Kumar,
http://www.ee.ucr.edu/~sramachandranna
Sarve bhavantu sukinaha (May everyone be happy)
Sarve santu niramiyaha (May everyone be without affliction)
Sarve bhadrani pashyantu (May everyone see only goodness)
Ma kashchit dukha bhak bhavet (Let none be the victim of suffering)


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