Is there still a way to explicitly compose functors ?

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

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

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

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
participants (2)
-
Benjamin Sobotta
-
Timothy Madden