ScopeGuard ensures that the specified functor is executed no matter how the current scope exits, unless it is dismissed.
Example:
Public Member Functions | |
| constexpr | ScopeGuard (Functor &&functor) |
| constexpr | ScopeGuard (ScopeGuard &&other) noexcept |
| template<typename OtherFunctor > | |
| constexpr | ScopeGuard (ScopeGuard< OtherFunctor > &&other) |
| ScopeGuard & | operator= (ScopeGuard &&other) noexcept |
| ScopeGuard (const ScopeGuard &)=delete | |
| ScopeGuard & | operator= (const ScopeGuard &)=delete |
| void | Dismiss () |