std::function_ref:: operator()
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Old binders and adaptors | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Member functions | ||||
|
function_ref::operator()
|
||||
| Deduction guides |
|
R operator
(
)
(
Args...
args
)
const
noexcept
(
/*noex*/
)
;
|
(自 C++26 起) | |
使用
bound-entity
作为第一个参数以及其余参数
args
调用存储的
thunk-ptr
。
operator
(
)
的
/*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>
的公开成员函数)
|