|
|
auto | active () const noexcept -> bool |
| | Check if the guard is active.
|
|
auto | dismiss () noexcept -> void |
| | Dismiss — disarm the guard (cleanup will NOT run).
|
| template<typename Fn> |
| auto | lib::make_scope_guard (Fn &&fn) noexcept -> scope_guard< Fn > |
| | Factory function — deduces Fn from the argument.
|
|
auto | operator= (const scope_guard &)=delete |
|
auto | operator= (scope_guard &&)=delete |
|
auto | rearm () noexcept -> void |
| | Re-arm a dismissed guard.
|
|
| scope_guard (const scope_guard &)=delete |
|
| scope_guard (Fn fn) noexcept |
| | Construct a scope guard with the given cleanup function.
|
|
| scope_guard (scope_guard &&other) noexcept |
| | Move constructor — transfers ownership.
|
|
| ~scope_guard () noexcept |
| | Destructor — executes the cleanup if still active.
|