名稱空間
變體
操作

operator==(std::copyable_function)

來自 cppreference.com
 
 
 
函式物件
函式呼叫
(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*)
 
 
friend bool operator==( const std::copyable_function& f, std::nullptr_t ) noexcept;
(C++26 起)

透過與 std::nullptr_t 進行正式比較,檢查包裝器 f 是否具有可呼叫目標。空包裝器(即沒有目標的包裝器)比較相等,非空函式比較不相等。

此函式對於普通的非限定查詢限定查詢不可見,只能透過引數依賴查詢std::copyable_function<FunctionType> 是引數的關聯類時才能找到。

!= 運算子由 operator== 合成

目錄

[編輯] 引數

f - 要比較的 std::copyable_function

[編輯] 返回值

!f.

[編輯] 示例

[編輯] 參閱

檢查 std::copyable_function 是否有目標
(公共成員函式) [編輯]
(在 C++20 中移除)
比較 std::functionnullptr
(函式模板) [編輯]
std::move_only_functionnullptr 進行比較
(函式) [編輯]