31 class ScopeExitSetFalse ;
48 explicit ScopeExit( std::function<
void()> fn ) ;
61 void operator=(
const ScopeExit & ) = delete ;
65 std::function<void()> m_fn ;
A class that sets a boolean variable to false at the end of its scope.
~ScopeExitSetFalse() noexcept
Destructor, sets the bound value to false.
ScopeExitSetFalse(bool &bref) noexcept
Constructor.
A class that calls an exit function at the end of its scope.
ScopeExit(std::function< void()> fn)
Constructor.
void release() noexcept
Deactivates the exit function.