46 std::shared_ptr<void> Guard_;
50 : Guard_ {
nullptr, [
f] (
void*) {
f (); } }
89 Perform_ = other.Perform_;
90 other.Perform_ =
false;
96 , Perform_ { other.Perform_ }
98 other.Perform_ =
false;
126 throw std::logic_error {
"this scope guard has already been converted to a shared one" };
constexpr detail::ExprTree< detail::ExprType::LeafStaticPlaceholder, detail::MemberPtrs< Ptr > > f
ScopeGuard< DefaultScopeGuardDeleter > EraseType()
detail::ScopeGuard< F > MakeScopeGuard(const F &f)
Returns an object performing passed function on scope exit.
SharedScopeGuard Shared()
ScopeGuard(const F &f) noexcept
std::function< void()> DefaultScopeGuardDeleter
SharedScopeGuard(const F &f)
ScopeGuard(ScopeGuard &&other) noexcept