Namespaces
Variants

operator== (std::copyable_function)

From de.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* )
friend bool operator == ( const std:: copyable_function & f, std:: nullptr_t ) noexcept ;
(seit C++26)

Prüft, ob der Wrapper f ein aufrufbares Ziel besitzt, indem er formal mit std::nullptr_t verglichen wird. Leere Wrapper (also Wrapper ohne Ziel) vergleichen gleich, nicht-leere Funktionen vergleichen ungleich.

Diese Funktion ist für gewöhnliches unqualified oder qualified lookup nicht sichtbar und kann nur durch argument-dependent lookup gefunden werden, wenn std::copyable_function<FunctionType> eine assoziierte Klasse der Argumente ist.

Der != -Operator wird synthetisiert aus operator== .

Inhaltsverzeichnis

Parameter

f - std::copyable_function zu vergleichen

Rückgabewert

! f .

Beispiel

Siehe auch

prüft, ob std::copyable_function ein Zielobjekt besitzt
(öffentliche Elementfunktion)
(entfernt in C++20)
vergleicht ein std::function mit nullptr
(Funktionstemplate)
(C++23)
vergleicht ein std::move_only_function mit nullptr
(Funktion)