operator==,!=(std::experimental::function)
来自cppreference.com
< cpp | experimental | function
在标头 <experimental/functional> 定义 | ||
template<class R, class... ArgTypes> bool operator==(conststd::experimental::function<R(ArgTypes...)>& f, | (1) | (库基础 TS) |
template<class R, class... ArgTypes> bool operator==(std::nullptr_t, | (2) | (库基础 TS) (库基础 TS v3 中移除) |
template<class R, class... ArgTypes> bool operator!=(conststd::experimental::function<R(ArgTypes...)>& f, | (3) | (库基础 TS) (库基础 TS v3 中移除) |
template<class R, class... ArgTypes> bool operator!=(std::nullptr_t, | (4) | (库基础 TS) (库基础 TS v3 中移除) |
比较 std::experimental::function
和空指针。空 function
(即无可调用目标的 function
)与之比较相等,非空 function
比较不相等。
| (库基础 TS v3) |
[编辑]参数
f | - | 要比较的 std::experimental::function |
[编辑]返回值
1,2)!f
3,4)(bool) f
[编辑]参阅
(C++20 移除) | 比较 std::function 和 nullptr (函数模板) |