Namespaces
Variants

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

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

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

std:: nullptr_t ) noexcept ;
(1) (ライブラリ基盤仕様 TS)
template < class R, class ... ArgTypes >

bool operator == ( std:: nullptr_t ,

const std:: experimental :: function < R ( ArgTypes... ) > & f ) noexcept ;
(2) (ライブラリ基盤仕様 TS)
(ライブラリ基盤仕様 TS v3 で削除)
template < class R, class ... ArgTypes >

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

std:: nullptr_t ) noexcept ;
(3) (ライブラリ基盤仕様 TS)
(ライブラリ基盤仕様 TS v3 で削除)
template < class R, class ... ArgTypes >

bool operator ! = ( std:: nullptr_t ,

const std:: experimental :: function < R ( ArgTypes... ) > & f ) noexcept ;
(4) (ライブラリ基盤仕様 TS)
(ライブラリ基盤仕様 TS v3 で削除)

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

!= 演算子は operator== から 合成されます

(ライブラリファンダメンタルTS v3)

パラメータ

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

戻り値

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

関連項目

(C++20で削除)
std::function nullptr を比較する
(関数テンプレート)