O'Reilly logo

Beyond the C++ Standard Library: An Introduction to Boost by Björn Karlsson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Library 10. Lambda

How Does the Lambda Library Improve Your Programs?

• Adapts functions and function objects for use with Standard Library algorithms

• Binds arguments to function calls

• Transforms arbitrary expressions into function objects compatible with the Standard Library algorithms

• Defines unnamed functions at the call site, thereby improving readability and maintainability of the code

• Implements predicates when and where needed

When using the Standard Library, or any library employing a similar design that relies on algorithmic configuration by the means of functions and function objects, one often ends up writing lots of small function objects that perform quite trivial operations. As we saw in “Library 9: Bind 9,” this can quickly ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required