Namespaces
Variants
Actions

std::copyable_function::operator bool

From cppreference.com
 
 
Utilities library
General utilities
Relational operators (deprecated in C++20)
(C++20)(C++20)(C++20)  
(C++20)
(C++20)
(C++14)
(C++11)
(C++11)
(C++23)
(C++11)
(C++17)
Common vocabulary types
(C++11)
(C++17)
(C++17)
(C++17)
(C++11)
(C++17)
(C++23)


 
Function objects
(C++17)(C++23)
Identity function object
(C++20)
(until C++17*)
(until C++17*)
(until C++17*)
(until C++17*)  
(until C++17*)
(until C++17*)(until C++17*)(until C++17*)(until C++17*)
(until C++20*)
(until C++20*)
(until C++17*)(until C++17*)
(until C++17*)(until C++17*)

(until C++17*)
(until C++17*)(until C++17*)(until C++17*)(until C++17*)
(until C++20*)
(until C++20*)
 
 
explicit operator bool() const noexcept;
(since C++26)

Checks whether *this stores a callable target, i.e. is not empty.

[edit] Parameters

(none)

[edit] Return value

true if *this stores a callable target, false otherwise.

[edit] Example

This section is incomplete
Reason: no example

[edit] See also

(C++26)
compares a std::copyable_function with nullptr
(function) [edit]
checks if a target is contained
(public member function of std::function<R(Args...)>) [edit]
checks if the std::move_only_function has a target
(public member function of std::move_only_function) [edit]
Retrieved from "https://en.cppreference.com/mwiki/index.php?title=cpp/utility/functional/copyable_function/operator_bool&oldid=175565"

AltStyle によって変換されたページ (->オリジナル) /