Boost logo

Boost :

Subject: Re: [boost] [functional] New functor adaptors
From: Ben Pope (benpope81_at_[hidden])
Date: 2013-09-17 01:26:54


On 17/09/13 12:43, Mathieu Champlon wrote:
> On 16/09/2013 20:11, Nathan Ridge wrote:
>> I don't think anything beats the Boost.Phoenix syntax:
>>
>> std::transform(begin, end, out, 2 * _1 + 5);
>
> To be totally fair it would be :
>
> std::transform(begin, end, out, 2 * boost::phoenix::placeholders::_1 + 5);

I think it's typical to bring the placeholders into the current scope.

Ben


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