ScopeGuard

ScopeGuard struct

The service class that provides services for running a particular function object when an instance of the class goes out of scope.

template<typename F>class ScopeGuard

Template parameters

ParameterDescription
FThe type of the function object invoked by the instances of the ScopedGuard class

Methods

MethodDescription
ScopeGuard(F)Constructs an instance that is set up to invoke the specified function object.
~ScopeGuard()Invokes the function object passed to the constructor.

See Also