Namespaces
Variants
Actions

std::function_ref::operator()

From cppreference.com
 
 
Utilities library
General utilities
Relational operators (deprecated in C++20)
(C++20)(C++20)(C++20)  
(C++20)
(C++20)
(C++14)
(C++11)
(C++11)
(C++23)
(C++11)
(C++17)
Common vocabulary types
(C++11)
(C++17)
(C++17)
(C++17)
(C++11)
(C++17)
(C++23)


 
Function objects
(C++17)(C++23)
Identity function object
(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*)
(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 ) const noexcept(/*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 return thunk-ptr (bound-entity , std::forward <Args>(args)...);.

[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

This section is incomplete
Reason: no 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]
Retrieved from "https://en.cppreference.com/mwiki/index.php?title=cpp/utility/functional/function_ref/operator()&oldid=178010"

AltStyle によって変換されたページ (->オリジナル) /