std::function (3) - Linux Manuals
Defined in header <functional>
template< class > (since C++11)
class function; /* undefined */
template< class R, class... Args > (since C++11)
Class template std::function is a general-purpose polymorphic function wrapper. Instances of std::function can store, copy, and invoke any Callable target -- functions, lambda_expressions, bind_expressions, or other function objects, as well as pointers to member functions and pointers to data members.
The stored callable object is called the target of std::function. If a std::function contains no target, it is called empty. Invoking the target of an empty std::function results in std::bad_function_call exception being thrown.
std::function satisfies the requirements of CopyConstructible and CopyAssignable.
argument_type(deprecated in C++17)(removed in C++20) T if sizeof...(Args)==1 and T is the first and only type in Args...
first_argument_type(deprecated in C++17)(removed in C++20) T1 if sizeof...(Args)==2 and T1 is the first of the two types in Args...
second_argument_type(deprecated in C++17)(removed in C++20) T2 if sizeof...(Args)==2 and T2 is the second of the two types in Args...
constructor (public member function)
destructor (public member function)
operator= (public member function)
swap (public member function)
assign assigns a new target
operator_bool (public member function)
operator() (public member function)
target_type (public member function)
target (public member function)
std::swap(std::function) specializes the std::swap algorithm
operator== (function template)
std::uses_allocator<std::function> specializes the std::uses_allocator type trait
(C++11) (until C++17)
// Run this code
bad_function_call the exception thrown when invoking an empty std::function
mem_fn creates a function object out of a pointer to a member