#include <muu/scope_guard.h>
template <typename T>
scope_success class
Performs actions when going out of scope only if no exceptions have been thrown.
Template parameters | |
---|---|
T | A noexcept function, lambda or other callable not requiring any arguments (e.g. void() noexcept )`. |
Constructors, destructors, conversion operators
-
template <typename U>scope_success(U&& func) explicit noexcept(…)
- Constructs a scope_
success by wrapping a callable.
Public functions
Function documentation
template <typename T>
template <typename U>
muu::scope_success::scope_success(U&& func) explicit noexcept(…)
template <typename U>
Constructs a scope_
Template parameters | |
---|---|
U | A function, lambda or other callable with the signature void() noexcept . |
Parameters | |
func | The callable to invoke when the scope guard goes out of scope. |