cpp/utility/functional

A function object is any object for which the function call operator is defined. C++ provides many built-in function objects as well as support for creation and manipulation of new function objects.

Function invocation
can invoke any object with given arguments according to the rules of.

Function wrappers
std provides support for storing arbitrary function objects.

Identity
std is the identity function object: it returns its argument unchanged.

Partial function application
std and std provide support for, i.e. binding arguments to functions to produce new functions.

Negators
std creates a function object that negates the result of the callable object passed to it.

Searchers
Searchers implementing several string searching algorithms are provided and can be used either directly or with std.

Reference wrappers
Reference wrappers allow reference arguments to be stored in copyable function objects:

Operator function objects
C++ defines several function objects that represent common arithmetic and logical operations:

Constrained comparison function objects
C++20 defines a set of constrained comparison function objects. The equality operators ( and ) require the types of the arguments to model. The relational operators (,, , and ) require the types of the arguments to model. The three-way comparison operator requires the type to model.

Old binders and adaptors
Several utilities that provided early functional support are deprecated in C++11 and removed in C++17 (old negators are deprecated in C++17 and removed in C++20):