std::reference_wrapper<T>::operator() (3) - Linux Manuals
std::reference_wrapper<T>::operator(): std::reference_wrapper<T>::operator()
NAME
std::reference_wrapper<T>::operator() - std::reference_wrapper<T>::operator()
Synopsis
template< class... ArgTypes > (since C++11)
typename std::result_of<T&(ArgTypes&&...)>::type (until C++17)
operator() ( ArgTypes&&... args ) const;
template< class... ArgTypes >
std::invoke_result_t<T&, ArgTypes...> (since C++17)
operator() ( ArgTypes&&... args ) const;
Calls the Callable object, reference to which is stored. This function is available only if the stored reference points to a Callable object.
T must be a complete type.
Parameters
args - arguments to pass to the called function
Return value
The return value of the called function.
Exceptions
(none)
Example
// Run this code
Output:
See also
get (public member function)
operator_T&