Boost logo

Boost :

Subject: [boost] 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 list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk