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()
120 template <
typename F>
127 template <
typename F,
typename P1>
152 template <
typename F,
typename P1>
159 template <
typename F,
typename P1,
typename P2>
185 template <
typename F,
typename P1,
typename P2>
192 template <
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)
218 template <
typename F,
typename P1,
typename P2,
typename P3>
227 template <
class Obj,
typename MemFun>
245 : obj_(obj), memFun_(memFun) {}
250 template <
class Obj,
typename MemFun>
257 template <
class Obj,
typename MemFun,
typename P1>
271 (obj_.*memFun_)(p1_);
275 : obj_(obj), memFun_(memFun), p1_(p1) {}
281 template <
class Obj,
typename MemFun,
typename P1>
288 template <
class Obj,
typename MemFun,
typename P1,
typename P2>
302 (obj_.*memFun_)(p1_, p2_);
306 : obj_(obj), memFun_(memFun), p1_(p1), p2_(p2) {}
313 template <
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 332 #endif //SCOPEGUARD_H_ scope guard class
Definition: ScopeGuard.h:128
scope guard class
Definition: ScopeGuard.h:55
scope guard class
Definition: ScopeGuard.h:97
scope guard class
Definition: ScopeGuard.h:228
scope guard class
Definition: ScopeGuard.h:193
templated class for ScopeGuard to hold a c++ reference
Definition: ScopeGuard.h:34
scope guard class
Definition: ScopeGuard.h:258
scope guard class
Definition: ScopeGuard.h:160
scope guard class
Definition: ScopeGuard.h:289