System::MakeScopeGuard‑metod

System::MakeScopeGuard method

En fabrikfunktion som skapar instanser av ScopedGuard‑klassen.

template<typename F> ScopeGuard<F> System::MakeScopeGuard(F f)
ParameterBeskrivning
Dentyp av funktionsobjektet som ska anropas av det konstruerade ScopedGuard‑objektet
ParameterTypeBeskrivning
fFFunktionsobjektet att skicka till ScopedGuard class’ konstruktor.

ReturnValue

En ny instans av ScopedGuard class

Se även