std::function::operator bool

From Cppreference

Jump to: navigation, search
explicit operator bool() const;
(since C++11)

Checks whether the stored callable object is valid.

[edit] Parameters

(none)

[edit] Return value

true if the stored callable object is valid, false otherwise.

[edit] Exceptions

noexcept specification:  
noexcept

  (since C++11)