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

Get Beyond the C++ Standard Library: An Introduction to Boost now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.