Scope guard that runs a cleanup action unless it is disabled.
More...
#include <src/utility.h>
|
|
void | disable () |
| | Disable the fail guard so destruction will not run the cleanup action.
|
|
| FailGuard (const FailGuard &)=delete |
| | FailGuard (FailGuard &&other) noexcept |
| | Construct a fail guard that owns the cleanup callback.
|
| | FailGuard (T &&f) noexcept |
| | Explicitly construct a fail guard that owns the cleanup callback.
|
|
FailGuard & | operator= (const FailGuard &)=delete |
|
FailGuard & | operator= (FailGuard &&other)=delete |
|
|
bool | failure {true} |
| | Whether the fail guard should run its cleanup action.
|
template<class T>
class util::FailGuard< T >
Scope guard that runs a cleanup action unless it is disabled.
◆ FailGuard() [1/2]
Explicitly construct a fail guard that owns the cleanup callback.
- Parameters
-
| f | Callable executed by the helper. |
◆ FailGuard() [2/2]
Construct a fail guard that owns the cleanup callback.
- Parameters
-
| other | Source object whose state is copied or moved into this object. |
The documentation for this class was generated from the following file: