![]() |
mrs_lib
Various reusable classes, functions and utilities for use in MRS projects
|
Utility class for running cleanup at the end of a scope. More...
#include <scope_cleanup.hpp>
Public Member Functions | |
| ScopeCleanup (T f) | |
| Create a scope cleanup that runs the specified callable when destroyed. | |
| ScopeCleanup (const ScopeCleanup &)=delete | |
| ScopeCleanup (ScopeCleanup &&)=delete | |
| ScopeCleanup & | operator= (const ScopeCleanup &)=delete |
| ScopeCleanup & | operator= (ScopeCleanup &&)=delete |
| void | cancel () |
| Disable running of the callback, when the cleanup object is destroyed. | |
Utility class for running cleanup at the end of a scope.
|
inlineexplicit |
Create a scope cleanup that runs the specified callable when destroyed.