std::function_ref::operator()

R operator()( Args... args ) const noexcept(/*noex*/);
(C++26 起)

bound-entity 为首个形参和其余参数 args 调用存储的 thunk-ptroperator() 中的 /*noex*/ 部分与 std::function_ref 的模板形参中的相同。

等价于 return thunk-ptr(bound-entity, std::forward<Args>(args)...);

参数

args - 要传递给存储的 thunk-ptr 的其余参数

返回值

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

异常

传播由底层函数调用所抛出的异常。

示例

参阅

调用目标
(std::function<R(Args...)> 的公开成员函数)
调用其所存储的函数
(std::reference_wrapper<T> 的公开成员函数)