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 9. Bind

How Does the Bind Library Improve Your Programs?

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

• Consistent syntax for creating binders

• Powerful functional composition

When using the algorithms from the Standard Library, you often need to supply them with a function or a function object. This is an excellent way of customizing the behavior of algorithms, but you often end up writing new function objects because you don't have the tools necessary for functional composition and adaptation of argument order or arity. Although the Standard Library does offer some productive tools, such as bind1st and bind2nd, this is rarely enough. Even when the functionality suffices, that often implies suffering ...

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