命名空间
变体
操作

std::function_ref::operator()

来自 cppreference.cn
< cpp‎ | 工具‎ | 函数‎ | 函数引用
 
 
 
函数对象
函数调用
(C++17)(C++23)
恒等函数对象
(C++20)
透明运算符包装器
(C++14)
(C++14)
(C++14)
(C++14)  
(C++14)
(C++14)
(C++14)
(C++14)
(C++14)
(C++14)
(C++14)
(C++14)
(C++14)

旧绑定器和适配器
(直到 C++17*)
(直到 C++17*)
(直到 C++17*)
(直到 C++17*)  
(直到 C++17*)
(直到 C++17*)(直到 C++17*)(直到 C++17*)(直到 C++17*)
(直到 C++20*)
(直到 C++20*)
(直到 C++17*)(直到 C++17*)
(直到 C++17*)(直到 C++17*)

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

调用存储的 thunk-ptr,将 bound-entity 作为其第一个参数,其余参数为 argsoperator()/*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> 的公共成员函数) [编辑]