Executing some clean-up code when leaving a scope.
◆ finally()
template<typename F >
FinalAction<typename std::decay_t<F> > gul14::finally |
( |
F && |
f | ) |
|
|
noexcept |
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.
- Template Parameters
-
F | The type of the closure/function to be called (normally autodeduced). |
- Parameters
-
f | The closure or pointer to function to be called on destruction. |
- Since
- GUL version 1.1