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) (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)
(удалено в library fundamentals TS v3)
template < class R, class ... ArgTypes >

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

std:: nullptr_t ) noexcept ;
(3) (library fundamentals TS)
(удалено в library fundamentals TS v3)
template < class R, class ... ArgTypes >

bool operator ! = ( std:: nullptr_t ,

const std:: experimental :: function < R ( ArgTypes... ) > & f ) noexcept ;
(4) (library fundamentals TS)
(удалено в library fundamentals TS v3)

Сравнивает std::experimental::function с нулевым указателем. Пустые функции (то есть функции без вызываемой цели) сравниваются как равные, непустые функции сравниваются как неравные.

Оператор != синтезируется из operator== .

(library fundamentals TS v3)

Параметры

f - std::experimental::function для сравнения

Возвращаемое значение

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

Смотрите также

(удалено в C++20)
сравнивает std::function с nullptr
(шаблон функции)