Boost logo

Boost :

Subject: Re: [boost] [functional] New functor adaptors
From: Nathan Ridge (zeratul976_at_[hidden])
Date: 2013-09-16 14:11:32


> > std::transform(begin, end, out,
> > boost::bind( std::plus<int>(), 5,
> > boost::bind( std::multiplies<int>(), 2, _1 ) ) );

I don't think anything beats the Boost.Phoenix syntax:

std::transform(begin, end, out, 2 * _1 + 5);

Regards,
Nate
                                               


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk