名前空間
変種
操作

operator==,!=(std::experimental::function)

From cppreference.com
 
 
 
 
 
ヘッダ <experimental/functional> で定義
template< class R, class... ArgTypes >

bool operator==( const std::experimental::function<R(ArgTypes...)>& f,

                 std::nullptr_t ) noexcept;
(1) (Library Fundamentals TS)
template< class R, class... ArgTypes >

bool operator==( std::nullptr_t,

                 const std::experimental::function<R(ArgTypes...)>& f ) noexcept;
(2) (Library Fundamentals TS)
(ライブラリファンダメンタルズTS v3 で削除されました)
template< class R, class... ArgTypes >

bool operator!=( const std::experimental::function<R(ArgTypes...)>& f,

                 std::nullptr_t ) noexcept;
(3) (Library Fundamentals TS)
(ライブラリファンダメンタルズTS v3 で削除されました)
template< class R, class... ArgTypes >

bool operator!=( std::nullptr_t,

                 const std::experimental::function<R(ArgTypes...)>& f ) noexcept;
(4) (Library Fundamentals TS)
(ライブラリファンダメンタルズTS v3 で削除されました)

std::experimental::function をヌルポインタと比較します。空の関数(つまり、呼び出し可能なターゲットを持たない関数)は等しいと比較され、空でない関数は等しくないと比較されます。

!= 演算子は operator== から合成される。

(ライブラリ基本TS v3)

[編集] パラメータ

f - 比較する std::experimental::function

[編集] 戻り値

1,2) !f
3,4) (bool) f

[編集] 関連項目

(C++20で削除)
std::functionnullptr を比較します。
(関数テンプレート) [編集]
English 日本語 中文(简体) 中文(繁體)