stdexperimentalfunction(3)
std::experimental::function - std::experimental::function
Synopsis
Defined in header <experimental/functional>
template< class > (library fundamentals TS)
class function; /* undefined */
template< class R, class… Args > (library fundamentals TS)
class function<R(Args…)>
std::experimental::function is a modified version of std::function with support for type-erased allocators.
Member types
Type Definition
allocator_type std::experimental::erased_type
Member functions
constructs a new std::experimental::function instance
constructor (public member function)
assigns a new target
operator= (public member function)
swaps the contents
swap (public member function)
retrieves a pointer to the memory resource used by this object to allocate memory
get_memory_resource (public member function)
Non-member functions
specializes the swap algorithm
std::experimental::swap(std::experimental::function) (function template)
compares an std::experimental::function with nullptr
operator== (function template)
operator!=
Helper classes
specializes the std::uses_allocator type trait
std::uses_allocator<std::experimental::function> (class template specialization)
Members identical to std::function
Member types
Type Definition
result_type R
argument_type T if sizeof…(Args)==1 and T is the first and only type in Args…
first_argument_type T1 if sizeof…(Args)==2 and T1 is the first of the two types in Args…
second_argument_type T2 if sizeof…(Args)==2 and T2 is the second of the two types in Args…
Member functions
destroys a std::function instance
destructor (public member function of std::function<R(Args…)>)
checks if a valid target is contained
operator_bool (public member function of std::function<R(Args…)>)
invokes the target
operator() (public member function of std::function<R(Args…)>)
Target access
obtains the typeid of the stored target
target_type (public member function of std::function<R(Args…)>)
obtains a pointer to the stored target
target (public member function of std::function<R(Args…)>)