O'Reilly logo

Boost C++ Application Development Cookbook by Antony Polukhin

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

Reordering the parameters of function

This recipe and the next one are devoted to a very interesting library, whose functionality at first glance looks like some kind of magic. This library is called Boost.Bind and it allows you to easily create new functional objects from functions, member functions, and functional objects, also allowing the reordering of the initial function's input parameters and binding some values or references as function parameters.

Getting ready

Knowledge of C++, STL algorithms, and functional objects is required for this recipe.

How to do it...

  1. Let's start with an example. You are working with a vector of integral types provided by some other programmer. That integral type has only one operator, +, but your task is to multiply ...

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