header

<functional>

Function objects
Function objects are objects specifically designed to be used with a syntax similar to that of functions. In C++, this is achieved by defining member function operator() in their class, like for example:
1
2
3
4
struct myclass {
  int operator()(int a) {return a;}
} myobject;
int x = myobject (0);           // function-like syntax with object myobject 

They are typically used as arguments to functions, such as predicates or comparison functions passed to standard algorithms.

Base classes


Operator classes

Arithmetic operations:

Comparison operations:

Logical operations:

Adaptor and conversion functions

Negators
Parameter binders
Conversors

Instrumental types

Functions

These functions create objects of wrapper classes based on its arguments:

Classes


Wrapper classes

Wrapper classes are classes that hold an object and have an interface similar to that object, but adding or changing some of its features:

Operator classes

Operator classes are classes that define functional objects that call operators:

Other classes


Namespaces