|
Sunshine master
Self-hosted game stream host for Moonlight.
|
Scope guard that runs a cleanup action unless it is disabled. More...
#include <src/utility.h>
Public Member Functions | |
| 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 | |
| Construct a fail guard that owns the cleanup callback. | |
| FailGuard & | operator= (const FailGuard &)=delete |
| FailGuard & | operator= (FailGuard &&other)=delete |
Public Attributes | |
| bool | failure {true} |
| Whether the fail guard should run its cleanup action. | |
Scope guard that runs a cleanup action unless it is disabled.
|
inlinenoexcept |
Construct a fail guard that owns the cleanup callback.
| f | Callable executed by the helper. |
|
inlinenoexcept |
Construct a fail guard that owns the cleanup callback.
| other | Source object whose state is copied or moved into this object. |