Boost logo

Boost Users :

Subject: Re: [Boost-users] Is there still a way to explicitly compose functors ?
From: Benjamin Sobotta (mayday_at_[hidden])
Date: 2010-09-09 06:57:49


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.

Benjamin


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