![]() |
General Utility Library for C++17 25.4.1
|
Executing some clean-up code when leaving a scope.
Classes | |
class | gul17::FinalAction< F > |
FinalAction allows us to execute something if the FinalAction object leaves the scope. More... | |
Functions | |
template<typename F > | |
FinalAction< typename std::decay_t< F > > | gul17::finally (F &&f) noexcept |
finally() - convenience function to generate a FinalAction | |
finally() - convenience function to generate a FinalAction
A FinalAction can be used to add RAII like behavior for non RAII object or to do timing measurements. More information given in the FinalAction documentation.
F | The type of the closure/function to be called (normally autodeduced). |
f | The closure or pointer to function to be called on destruction. |
References gul17::bit_set().