Lines Matching defs:ScopeGuard
23 class ScopeGuard {
25 explicit ScopeGuard(Func &&f) : func_(std::forward<Func>(f)), active_(true)
29 ScopeGuard(ScopeGuard &&rhs) : func_(std::move(rhs.func_)), active_(rhs.active_)
34 ~ScopeGuard()
61 ScopeGuard() = delete;
62 ScopeGuard(const ScopeGuard &) = delete;
63 ScopeGuard &operator=(const ScopeGuard &) = delete;
64 ScopeGuard &operator=(ScopeGuard &&) = delete;
71 inline ScopeGuard<Func> operator+(ScopeGuardOnExit, Func &&fn)
73 return ScopeGuard<Func>(std::forward<Func>(fn));
79 * ScopeGuard ensure the specified function which is created by ON_SCOPE_EXIT is executed no matter how the current