Constructs a guard from an exit function.

Synopses

Declared in <beman/scope/scope.hpp>

Copy constructor

scope_guard(scope_guard const& other) = delete;

Move constructor

scope_guard(scope_guard&& other) = delete;

Constructs a guard from an exit function.

template<typename T>
constexpr
explicit
scope_guard(T&& exit_func) noexcept(std::is_nothrow_constructible_v<ScopeExitFunc>)
requires (!std::is_same_v<std::remove_cvref<T>, scope_guard>);