1.10 |
Utility to run a callback when this object goes out of scope. More...
#include <meta.h>
Public Member Functions | |
ScopeExit ()=delete | |
ScopeExit (const ScopeExit &)=delete | |
ScopeExit (const T &f) noexcept | |
ScopeExit (ScopeExit &&other) noexcept | |
Move constructor. | |
ScopeExit (T &&f) noexcept | |
~ScopeExit () | |
ScopeExit & | operator= (const ScopeExit &)=delete |
ScopeExit & | operator= (ScopeExit &&)=delete |
Protected Attributes | |
bool | m_active |
Used to manage move. | |
T | m_f |
Callback function. | |
Utility to run a callback when this object goes out of scope.
This can be used to run a callable when an instance of a ScopeExit goes out of scope or is deleted.
|
inlineexplicitnoexcept |
f | Callable to call on destruction. |
|
inlineexplicitnoexcept |
f | Callable to call on destruction. |
|
delete |
|
inline |
|
protected |
Used to manage move.
|
protected |
Callback function.