名稱空間
變體
操作

std::function_ref::operator()

來自 cppreference.com
< 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> 的公共成員函式) [編輯]