operator==,!=(std::experimental::function)
来自 cppreference.cn
< cpp | experimental | function
定义于头文件 <experimental/functional> |
||
template< class R, class... ArgTypes > bool operator==( const std::experimental::function<R(ArgTypes...)>& f, |
(1) | (library fundamentals TS) |
template< class R, class... ArgTypes > bool operator==( std::nullptr_t, |
(2) | (library fundamentals TS) (removed in library fundamentals TS v3) |
template< class R, class... ArgTypes > bool operator!=( const std::experimental::function<R(ArgTypes...)>& f, |
(3) | (library fundamentals TS) (removed in library fundamentals TS v3) |
template< class R, class... ArgTypes > bool operator!=( std::nullptr_t, |
(4) | (library fundamentals TS) (removed in library fundamentals TS v3) |
将 std::experimental::function
与空指针进行比较。 空函数(即,没有可调用目标的函数)比较相等,非空函数比较不相等。
|
(library fundamentals TS v3) |
[编辑] 参数
f | - | 要比较的 std::experimental::function |
[编辑] 返回值
1,2) !f
3,4) (bool) f
[编辑] 参见
(在 C++20 中移除) |
将 std::function 与 nullptr 进行比较 (函数模板) |