Functional (C++)

In the context of the programming language C++, functional refers to a header file that is part of the C++ Standard Library and provides a set of predefined class templates for function objects, including operations for arithmetic, comparisons, and logic.

The class template std::function provided by C++11 is a general-purpose polymorphic function wrapper.

The algorithms provided by the C++ Standard Library do not require function objects of more than two arguments.

Function objects that return Boolean values are an important special case.

The C++ Standard Library includes in the header file functional many different predefined function objects, including arithmetic operations (plus, minus, multiplies, divides, modulus, and negate), comparisons (equal_to, not_equal_to, greater, less, greater_equal, and less_equal), and logical operations (logical_and, logical_or, and logical_not).