Boost :: function and boost :: bind are cool, but what's really cool about boost :: lambda?

On Parameter 1 Effective C ++ Meyers talks about generic functors and binding:

I find it tr1::functionallows you to do so amazingly, it makes me tingle all over. If you do not tingle, it may be because you are looking at the definition ... and it is interesting that continuing with ....

And I agree with him regarding binding and function. About lambda, well, I understand what lambda does and how it does it, but can someone post a piece of the mind-blowing style of the book or a verbal essay about why lambda should (in Meyers terminology) remove my socks? I ask, because every area of ​​C ++ that uses placeholder syntax seems to be hacked (yes, I know enough about the functional method , so please don't base it ), I agree with how it was used in binding and MPL ; However, in the case of lambda, I just want it to be justified, so I can determine the weather, I have to enter it in my repertoire.

- change -

This "SO" answer mentions inline functor creation using the just-installed syntax, it mentions advanced use, and this is probably what I want ... in advanced use, is it still just built-in functor creation?

+3
source share
2 answers

Based on the comments above and the link in the question, I accept the following answer (community wiki):

  • Boost.Lambda ( ). Function + Bind, , , - , , .

  • , Function-Bind Lambda - , Lambda , Boost.

+4

"", , , boost foreach boost, / ++, , .. .

0

Source: https://habr.com/ru/post/1730661/


All Articles