lean cpp library
A lean C++ library providing efficient utility classes for high-performance C++ applications.
|
Stores and calls a callable object on destruction, if not disarmed. More...
#include <scope_guard.h>
Public Member Functions | |
LEAN_INLINE void | armed (bool arm) const |
Sets whether the scope guard is currently armed. | |
LEAN_INLINE bool | armed () const |
Gets whether the scope guard is currently armed. | |
LEAN_INLINE void | disarm () const |
Disarms this scope guard. | |
LEAN_INLINE void | arm () const |
Re-arms this scope guard. | |
Protected Member Functions | |
LEAN_INLINE | scope_guard_base (bool arm=true) |
Constructs a scope guard (optionally disarmed). | |
LEAN_INLINE | scope_guard_base (const scope_guard_base &right) |
Copies AND DISARMS the given scope guard. |
Stores and calls a callable object on destruction, if not disarmed.