Namespaces
Variants
Views
Actions

std::function::target

From cppreference.com
< cpp‎ | utility‎ | functional‎ | function
Revision as of 14:51, 2 November 2012 by P12bot (Talk | contribs)

 
 
 
Function objects
Function wrappers
(C++11)
(C++11)
Bind
(C++11)
Reference wrappers
(C++11)(C++11)
Operator wrappers
Negators
Deprecated binders and adaptors
(deprecated)
(deprecated)
(deprecated)
(deprecated)
(deprecated)(deprecated)(deprecated)(deprecated)
(deprecated)
(deprecated)(deprecated)(deprecated)(deprecated)
(deprecated)(deprecated)
(deprecated)(deprecated)
 
 

Template:ddcl list begin <tr class="t-dcl ">

<td >
template< class T >
T* target();
</td>

<td > (1) </td> <td > (since C++11) </td> </tr> <tr class="t-dcl ">

<td >
template< class T >
const T* target() const;
</td>

<td > (2) </td> <td > (since C++11) </td> </tr> Template:ddcl list end

Returns a pointer to the stored function target.

Contents

Parameters

(none)

Return value

A pointer to the stored function if target_type() == typeid(T), otherwise a null pointer.

Exceptions

noexcept specification:  
noexcept
  

Example

See also

obtains the typeid of the stored target of a std::function
(public member function) [edit]