Boost logo

Boost Users :

Subject: [Boost-users] range transformed -adaptor incompatible with lambda functions
From: Sandeep Gupta (gupta.sandeep_at_[hidden])
Date: 2009-03-19 11:38:24


Hi,
 I would be nice if range-transformed worked with lambda functions.
Is this an intended behaviour. To illustrate
the following two statements fail

 for_each(myvec|boost::adaptors::transformed(arg1+mask), std::cout<<arg1<<' ');
 for_each(myvec|boost::adaptors::transformed(boost::lambda::_1 +
mask), std::cout<<boost::lambda::_1<<' ');

But this is fine:
 for_each(myvec|boost::adaptors::transformed(double_int()),
std::cout<<boost::lambda::_1<<' ');
where double_int hand created function object with result_type declaration.

Thanks
sandeep


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