Primary class template for std::function.Polymorphic function wrapper. More...

Primary class template for std::function.
Polymorphic function wrapper.
Definition at line 1812 of file functional.
| std::function< _Res(_ArgTypes...)>::function | ( | ) | [inline, explicit] |
Default construct creates an empty function call wrapper.
!(bool)*this Definition at line 1830 of file functional.
| std::function< _Res(_ArgTypes...)>::function | ( | _M_clear_type * | ) | [inline] |
Default construct creates an empty function call wrapper.
!(bool)*this Definition at line 1836 of file functional.
| std::function< _Res(_ArgTypes...)>::function | ( | const function< _Res(_ArgTypes...)> & | __x | ) |
Function copy constructor.
| x | A function object with identical call signature. |
(bool)*this == (bool)xThe newly-created function contains a copy of the target of x (if it has one).
Definition at line 2080 of file functional.
| std::function< _Res(_ArgTypes...)>::function | ( | function< _Res(_ArgTypes...)> && | __x | ) | [inline] |
Function move constructor.
| x | A function object rvalue with identical call signature. |
The newly-created function contains the target of x (if it has one).
Definition at line 1855 of file functional.
| std::function< _Res(_ArgTypes...)>::function | ( | _Functor | __f, | |
| typename enable_if< !is_integral< _Functor >::value, _Useless >::type | = _Useless() | |||
| ) |
Builds a function that targets a copy of the incoming function object.
| f | A function object that is callable with parameters of type T1, T2, ..., TN and returns a value convertible to Res. |
The newly-created function object will target a copy of f. If f is reference_wrapper<F>, then this function object will contain a reference to the function object f.get(). If f is a NULL function pointer or NULL pointer-to-member, the newly-created object will be empty.
If f is a non-NULL function pointer or an object of type reference_wrapper<F>, this function will not throw.
Definition at line 2094 of file functional.
| std::function< _Res(_ArgTypes...)>::operator bool | ( | ) | const [inline, explicit] |
Determine if the function wrapper has a target.
true when this function object contains a target, or false when it is empty.This function will not throw an exception.
Definition at line 2023 of file functional.
| _Res std::function< _Res(_ArgTypes...)>::operator() | ( | _ArgTypes... | __args | ) | const |
Invokes the function targeted by *this.
| bad_function_call | when !(bool)*this |
The function call operator invokes the target function object stored by this.
Definition at line 2112 of file functional.
| function& std::function< _Res(_ArgTypes...)>::operator= | ( | function< _Res(_ArgTypes...)> && | __x | ) | [inline] |
Function move-assignment operator.
| x | A function rvalue with identical call signature. |
*this The target of x is moved to *this. If x has no target, then *this will be empty.
If x targets a function pointer or a reference to a function object, then this operation will not throw an exception.
Definition at line 1915 of file functional.
| enable_if<!is_integral<_Functor>::value, function&>::type std::function< _Res(_ArgTypes...)>::operator= | ( | _Functor && | __f | ) | [inline] |
Function assignment to a new target.
| f | A function object that is callable with parameters of type T1, T2, ..., TN and returns a value convertible to Res. |
*this This function object wrapper will target a copy of f. If f is reference_wrapper<F>, then this function object will contain a reference to the function object f.get(). If f is a NULL function pointer or NULL pointer-to-member, this object will be empty.
If f is a non-NULL function pointer or an object of type reference_wrapper<F>, this function will not throw.
Definition at line 1958 of file functional.
| enable_if<!is_integral<_Functor>::value, function&>::type std::function< _Res(_ArgTypes...)>::operator= | ( | reference_wrapper< _Functor > | __f | ) | [inline] |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 1967 of file functional.
| function& std::function< _Res(_ArgTypes...)>::operator= | ( | const function< _Res(_ArgTypes...)> & | __x | ) | [inline] |
Function assignment operator.
| x | A function with identical call signature. |
(bool)*this == (bool)x *this The target of x is copied to *this. If x has no target, then *this will be empty.
If x targets a function pointer or a reference to a function object, then this operation will not throw an exception.
Definition at line 1897 of file functional.
| function& std::function< _Res(_ArgTypes...)>::operator= | ( | _M_clear_type * | ) | [inline] |
Function assignment to zero.
!(bool)*this *this The target of *this is deallocated, leaving it empty.
Definition at line 1929 of file functional.
| void std::function< _Res(_ArgTypes...)>::swap | ( | function< _Res(_ArgTypes...)> & | __x | ) | [inline] |
Swap the targets of two function objects.
| f | A function with identical call signature. |
Swap the targets of this function object and f. This function will not throw an exception.
Definition at line 1982 of file functional.
References std::swap().
| const _Functor * std::function< _Res(_ArgTypes...)>::target | ( | ) | const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 2158 of file functional.
| _Functor * std::function< _Res(_ArgTypes...)>::target | ( | ) |
Access the stored target function object.
typeid(Functor).equals(target_type()); otherwise, a NULL pointer.This function will not throw an exception.
Definition at line 2139 of file functional.
| const type_info & std::function< _Res(_ArgTypes...)>::target_type | ( | ) | const |
Determine the type of the target of this function object wrapper.
typeid(void) if !(bool)*this.This function will not throw an exception.
Definition at line 2123 of file functional.
1.7.1