22#pragma clang diagnostic warning "-W#warnings"
26#pragma GCC diagnostic warning "-Wcpp"
27#pragma GCC diagnostic ignored "-Wnoexcept-type"
64 : dismissed_(other.dismissed_)
70 static void SafeExecute(J& j)
throw()
82 mutable bool dismissed_;
87 void Dismiss()
const throw()
127template <
typename F,
typename P1>
152template <
typename F,
typename P1>
159template <
typename F,
typename P1,
typename P2>
185template <
typename F,
typename P1,
typename P2>
192template <
typename F,
typename P1,
typename P2,
typename P3>
209 ScopeGuardImpl3(F fun, P1 p1, P2 p2, P3 p3) : fun_(fun), p1_(p1), p2_(p2), p3_(p3)
218template <
typename F,
typename P1,
typename P2,
typename P3>
227template <
class Obj,
typename MemFun>
245 : obj_(obj), memFun_(memFun) {}
250template <
class Obj,
typename MemFun>
257template <
class Obj,
typename MemFun,
typename P1>
271 (obj_.*memFun_)(p1_);
275 : obj_(obj), memFun_(memFun), p1_(p1) {}
281template <
class Obj,
typename MemFun,
typename P1>
288template <
class Obj,
typename MemFun,
typename P1,
typename P2>
302 (obj_.*memFun_)(p1_, p2_);
306 : obj_(obj), memFun_(memFun), p1_(p1), p2_(p2) {}
313template <
class Obj,
typename MemFun,
typename P1,
typename P2>
319#define CONCATENATE_DIRECT(s1, s2) s1##s2
320#define CONCATENATE(s1, s2) CONCATENATE_DIRECT(s1, s2)
321#define ANONYMOUS_VARIABLE(str) CONCATENATE(str, __LINE__)
324# define UNUSED_VARIABLE __attribute__((unused))
326# define UNUSED_VARIABLE
329#define ON_BLOCK_EXIT ScopeGuard UNUSED_VARIABLE ANONYMOUS_VARIABLE(scopeGuard) = MakeGuard
330#define ON_BLOCK_EXIT_OBJ ScopeGuard UNUSED_VARIABLE ANONYMOUS_VARIABLE(scopeGuard) = MakeObjGuard
scope guard class
Definition: ScopeGuard.h:229
scope guard class
Definition: ScopeGuard.h:259
scope guard class
Definition: ScopeGuard.h:290
templated class for ScopeGuard to hold a c++ reference
Definition: ScopeGuard.h:35
scope guard class
Definition: ScopeGuard.h:98
scope guard class
Definition: ScopeGuard.h:129
scope guard class
Definition: ScopeGuard.h:161
scope guard class
Definition: ScopeGuard.h:194
scope guard class
Definition: ScopeGuard.h:56