Boost logo

Boost Users :

Subject: Re: [Boost-users] Is there still a way to explicitly compose functors ?
From: Timothy Madden (terminatorul_at_[hidden])
Date: 2010-09-14 03:33:59


On 09.09.2010 13:57, Benjamin Sobotta wrote:
> On Thursday 09 September 2010 12:09:57 pm Timothy Madden wrote:
>> Hello
>>
>> I just do not like the ugly syntax with using the _1 placeholder (or _2,
>> or whatever) used in bind and lambda; is there still some other way to
>> compose functors ? Like with compose ?
>>
>> Thank you,
>> Timothy Madden
>>
>
> Hello!
>
> Well if you don't like '_1' you can create your own placeholders. For example
>
> boost::lambda::placeholder1_type meaningful_name;
>
> well create a placeholder 'meaningful_name' you can use in place of '_1'.
> Similarly you can use placeholder2_type for _2 and so on.

Thank you!

Indeed boost::lambda::placeholder1_type() is a lot than _1, and it works
for me, but it would be nice to still have the ability to compose
functors when needed...

Timothy Madden


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