25 std::shared_ptr<void> Guard_;
29 : Guard_ { nullptr, [f] (void*) { f (); } }
68 Perform_ = other.Perform_;
69 other.Perform_ =
false;
75 , Perform_ { other.Perform_ }
77 other.Perform_ =
false;
105 throw std::logic_error {
"this scope guard has already been converted to a shared one" };
SharedScopeGuard Shared()
ScopeGuard(const ScopeGuard &)=delete
ScopeGuard(ScopeGuard &&other) noexcept
ScopeGuard(const F &f) noexcept
ScopeGuard< DefaultScopeGuardDeleter > EraseType()
SharedScopeGuard(SharedScopeGuard &&)=default
SharedScopeGuard(const SharedScopeGuard &)=default
SharedScopeGuard(const F &f)
SharedScopeGuard()=delete
std::function< void()> DefaultScopeGuardDeleter
detail::ScopeGuard< F > MakeScopeGuard(const F &f)
Returns an object performing passed function on scope exit.