47 #ifndef BLOCXX_SCOPE_GUARD_HPP_INCLUDE_GUARD_
48 #define BLOCXX_SCOPE_GUARD_HPP_INCLUDE_GUARD_
50 #include "blocxx/BLOCXX_config.h"
108 template <
typename F>
134 template <
typename F>
140 template <
typename F,
typename P1>
167 template <
typename F,
typename P1>
173 template <
typename F,
typename P1,
typename P2>
201 template <
typename F,
typename P1,
typename P2>
207 template <
typename F,
typename P1,
typename P2,
typename P3>
236 template <
typename F,
typename P1,
typename P2,
typename P3>
244 template <
class Obj,
typename MemFun>
271 template <
class Obj,
typename MemFun>
277 template <
typename Ret,
class Obj1,
class Obj2>
283 template <
typename Ret,
class Obj1,
class Obj2>
289 template <
class Obj,
typename MemFun,
typename P1>
317 template <
class Obj,
typename MemFun,
typename P1>
323 template <
typename Ret,
class Obj1,
class Obj2,
typename P1a,
typename P1b>
329 template <
typename Ret,
class Obj1,
class Obj2,
typename P1a,
typename P1b>
335 template <
class Obj,
typename MemFun,
typename P1,
typename P2>
364 template <
class Obj,
typename MemFun,
typename P1,
typename P2>
370 template <
typename Ret,
class Obj1,
class Obj2,
typename P1a,
typename P1b,
typename P2a,
typename P2b>
376 template <
typename Ret,
class Obj1,
class Obj2,
typename P1a,
typename P1b,
typename P2a,
typename P2b>
384 #define BLOCXX_CONCATENATE_DIRECT(s1, s2) s1##s2
385 #define BLOCXX_CONCATENATE(s1, s2) BLOCXX_CONCATENATE_DIRECT(s1, s2)
386 #define BLOCXX_ANONYMOUS_VARIABLE(str) BLOCXX_CONCATENATE(str, __LINE__)
388 #define BLOCXX_ON_BLOCK_EXIT blocxx::ScopeGuard BLOCXX_ANONYMOUS_VARIABLE(scopeGuard) = blocxx::makeGuard
389 #define BLOCXX_ON_BLOCK_EXIT_OBJ blocxx::ScopeGuard BLOCXX_ANONYMOUS_VARIABLE(scopeGuard) = blocxx::makeObjGuard
static ObjScopeGuardImpl0< Obj, MemFun > makeObjGuard(Obj &obj, MemFun memFun)
ScopeGuardImpl2(F fun, P1 p1, P2 p2)
ObjScopeGuardImpl0< Obj, MemFun > makeObjGuard(Obj &obj, MemFun memFun)
ObjScopeGuardImpl1(Obj &obj, MemFun memFun, P1 p1)
static void safeExecute(J &j)
static ScopeGuardImpl2< F, P1, P2 > makeGuard(F fun, P1 p1, P2 p2)
ScopeGuardImplBase(const ScopeGuardImplBase &other)
static ObjScopeGuardImpl2< Obj, MemFun, P1, P2 > makeObjGuard(Obj &obj, MemFun memFun, P1 p1, P2 p2)
const ScopeGuardImplBase & ScopeGuard
See Andrei's and Petru Marginean's CUJ article http://www.cuj.com/documents/s=8000/cujcexp1812alexand...
static ScopeGuardImpl0< F > makeGuard(F fun)
ScopeGuardImpl1(F fun, P1 p1)
ScopeGuardImpl3(F fun, P1 p1, P2 p2, P3 p3)
static ScopeGuardImpl3< F, P1, P2, P3 > makeGuard(F fun, P1 p1, P2 p2, P3 p3)
static ScopeGuardImpl1< F, P1 > makeGuard(F fun, P1 p1)
ObjScopeGuardImpl0(Obj &obj, MemFun memFun)
ScopeGuardImplBase & operator=(const ScopeGuardImplBase &)
ScopeGuardImpl0< F > makeGuard(F fun)
ObjScopeGuardImpl2(Obj &obj, MemFun memFun, P1 p1, P2 p2)
static ObjScopeGuardImpl1< Obj, MemFun, P1 > makeObjGuard(Obj &obj, MemFun memFun, P1 p1)