Boost logo

Boost Users :

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


Hi,
the following code gives me compile error:

#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
}

Could you please help?
thanks
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