Namespaces
Variants

std::function_ref:: operator()

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* )
R operator ( ) ( Args... args ) const noexcept ( /*noex*/ ) ;
(depuis C++26)

Appelle le thunk-ptr stocké avec bound-entity comme premier paramètre et le reste des paramètres args . La partie /*noex*/ de operator ( ) est identique à celle du paramètre template de std::function_ref .

Équivalent à return thunk-ptr ( bound-entity , std:: forward < Args > ( args ) ... ) ; .

Table des matières

Paramètres

args - paramètres restants à passer au thunk-ptr stocké

Valeur de retour

thunk-ptr ( bound-entity , std:: forward < Args > ( args ) ... ) .

Exceptions

Propage l'exception levée par l'appel de fonction sous-jacent.

Exemple

Voir aussi

invoque la cible
(fonction membre publique de std::function<R(Args...)> )
appelle la fonction stockée
(fonction membre publique de std::reference_wrapper<T> )