Callable Objects

Download c++ eBook

Introduction

Callable objects are the collection of all C++ structures which can be used as a function. In practice, this are all things you can pass to the C++17 STL function invoke() or which can be used in the constructor of std::function, this includes: Function pointers, Classes with operator(), Classes with implicit conversions, References to functions, Pointers to member functions, Pointers to member data, lambdas. The callable objects are used in many STL algorithms as predicate.

Remarks

A very useful talk by Stephan T. Lavavej (<functional>: What's New, And Proper Use) (Slides) leads to the base of this documentation.

Related Examples

Stats

58 Contributors: 2
Sunday, June 11, 2017
Licensed under: CC-BY-SA

Not affiliated with Stack Overflow
Rip Tutorial: info@zzzprojects.com

Download eBook