Namespaces
Variants
Actions

std::function_ref::operator()

From cppreference.com
 
 
 
Function objects
Function invocation
(C++17)(C++23)
Identity function object
(C++20)
Old binders and adaptors
(until C++17*)
(until C++17*)
(until C++17*)
(until C++17*)  
(until C++17*)
(until C++17*)(until C++17*)(until C++17*)(until C++17*)
(until C++20*)
(until C++20*)
(until C++17*)(until C++17*)
(until C++17*)(until C++17*)

(until C++17*)
(until C++17*)(until C++17*)(until C++17*)(until C++17*)
(until C++20*)
(until C++20*)
 
 
R operator()( Args... args)constnoexcept(/*noex*/);
(since C++26)

Invokes the stored thunk-ptr with bound-entity as its first parameter and the rest of the parameters args. The /*noex*/ part of operator() is identical to those of the template parameter of std::function_ref.

Equivalent to returnthunk-ptr(bound-entity, std::forward<Args>(args)...);.

Contents

[edit]Parameters

args - rest parameters to pass to the stored thunk-ptr

[edit]Return value

thunk-ptr(bound-entity, std::forward<Args>(args)...).

[edit]Exceptions

Propagates the exception thrown by the underlying function call.

[edit]Example

[edit]See also

invokes the target
(public member function of std::function<R(Args...)>)[edit]
calls the stored function
(public member function of std::reference_wrapper<T>)[edit]
close