31 template <
typename T,T Value>
class ScopeExitSet ;
32 using ScopeExitSetFalse = ScopeExitSet<bool,false> ;
49 explicit ScopeExit( std::function<
void()> fn ) ;
66 std::function<void()> m_fn ;
80template <
typename T,T Value>
128template <
typename T,T Value>
134template <
typename T,T Value>
142 template <
typename T,T Value>
A class that sets a simple variable to a particular value at the end of its scope.
void release() noexcept
Deactivates the exit function.
~ScopeExitSet() noexcept
Destructor, sets the bound value.
ScopeExitSet(T &ref) 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.