16 static_assert(std::is_nothrow_move_constructible_v<Fn>);
17 static_assert(std::is_invocable_v<Fn>);
20 : fn_(std::move(fn)) {}
23 : fn_(std::move(other.fn_)),
24 active_(other.active_) {
General-purpose scope guard intended to call its exit function when a scope is exited.
ScopeExit(ScopeExit &&other) noexcept
ScopeExit(Fn &&fn) noexcept
ScopeExit(const ScopeExit &)=delete
~ScopeExit() noexcept(std::is_nothrow_invocable_v< Fn >)
ScopeExit & operator=(const ScopeExit &)=delete
ScopeExit & operator=(ScopeExit &&)=delete