20 General utilities library [utilities]

20.8 Function objects [function.objects]

20.8.11 Polymorphic function wrappers [func.wrap] Class template function [func.wrap.func] function target access [func.wrap.func.targ]

const std::type_info& target_type() const noexcept;

Returns: If *this has a target of type T, typeid(T); otherwise, typeid(void).

template<typename T> T* target() noexcept; template<typename T> const T* target() const noexcept;

Requires: T shall be a type that is Callable ([func.wrap.func]) for parameter types ArgTypes and return type R.

Returns: If target_type() == typeid(T) a pointer to the stored function target; otherwise a null pointer.