25 std::shared_ptr<void> Guard_;
59 template<
typename F1,
typename F2>
60 requires std::is_same_v<F, DefaultScopeGuardDeleter>
64 [
f1 = std::move (
g1.F_),
p1 =
g1.Perform_,
f2 = std::move (
g2.F_),
p2 =
g2.Perform_]
72 , Perform_ {
g1.Perform_ ||
g2.Perform_ }
87 Perform_ =
other.Perform_;
88 other.Perform_ =
false;
94 , Perform_ {
other.Perform_ }
96 other.Perform_ =
false;
124 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()
ScopeGuard(ScopeGuard< F1 > &&g1, ScopeGuard< F2 > &&g2)
SharedScopeGuard(SharedScopeGuard &&)=default
SharedScopeGuard(const SharedScopeGuard &)=default
SharedScopeGuard(const F &f)
SharedScopeGuard()=delete
std::function< void()> DefaultScopeGuardDeleter
Container< T > Filter(const Container< T > &c, F f)
detail::ScopeGuard< F > MakeScopeGuard(const F &f)
Returns an object performing passed function on scope exit.