Namespaces
Variants

std::copyable_function:: operator bool

From cppreference.net
Utilities library
Function objects
Function invocation
(C++17) (C++23)
Identity function object
(C++20)
Old binders and adaptors
( 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 ;
(depuis C++26)

Vérifie si * this contient une cible appelable, c'est-à-dire n'est pas vide.

Table des matières

Paramètres

(aucun)

Valeur de retour

true si * this stocke une cible appelable, false sinon.

Exemple

Voir aussi

(C++26)
compare un std::copyable_function avec nullptr
(fonction)
vérifie si une cible est contenue
(fonction membre publique de std::function<R(Args...)> )
vérifie si le std::move_only_function a une cible
(fonction membre publique de std::move_only_function )