operator==,!=(std::experimental::function) - cppreference.com

##### cppreference.com

##### Search

Create account

##### Namespaces

- Page
- Discussion

##### Variants

##### Views

- View
- Edit
- History

##### Actions

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

From cppreference.com
< cpp‎ | experimental‎ | function

template< class R, class... ArgTypes > bool operator==( const std::experimental::function<R(ArgTypes...)>& f, std::nullptr_t ); | (1) | (library fundamentals TS)
template< class R, class... ArgTypes > bool operator==( std::nullptr_t, const std::experimental::function<R(ArgTypes...)>& f ); | (2) | (library fundamentals TS)
template< class R, class... ArgTypes > bool operator!=( const std::experimental::function<R(ArgTypes...)>& f, std::nullptr_t ); | (3) | (library fundamentals TS)
template< class R, class... ArgTypes > bool operator!=( std::nullptr_t, const std::experimental::function<R(ArgTypes...)>& f ); | (4) | (library fundamentals TS)

Compares a `std::experimental::function` with a null pointer. Empty functions (that is, functions without a callable target) compare equal, non-empty functions compare non-equal.

### [edit] Parameters

f | - | `std::experimental::function` to compare

### [edit] Return value

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

### [edit] Exceptions

`noexcept` specification:
noexcept

### [edit] See also

operator==operator!= | compares an std::function with nullptr (function template) [edit]

Retrieved from "http://en.cppreference.com/mwiki/index.php?title=cpp/experimental/function/operator_cmp&oldid=91497"
Category:

- unconditionally noexcept

Hidden categories:

- Pages with unreviewed unconditional noexcept template
- Pages with unreviewed noexcept template