Generalized scope guard template This template provides the general behaviors required for more concrete instances of scope types.
Synopsis
Declared in <beman/scope/scope.hpp>
template<
class ScopeExitFunc,
class InvokeChecker,
exception_during_construction_behaviour ConstructionExceptionBehavior>
class scope_guard<ScopeExitFunc, InvokeChecker, ConstructionExceptionBehavior>;
Member Functions
Name |
Description |
|
The constructor parameter |
|
Destructor |
|
Assignment operators |
Template Parameters
Name |
Description |
ScopeExitFunction |
callable function that is conditionally invoked at the end of the scope. |
InvokeChecker |
callable function that handles checking if callback should be called on scope exit. |
ConstructionExceptionBehavior |
callable function that defines the behavior if an exception occurs on the construction. |