9 #ifndef BOOST_MULTI_INDEX_DETAIL_SCOPE_GUARD_HPP
10 #define BOOST_MULTI_INDEX_DETAIL_SCOPE_GUARD_HPP
21 namespace multi_index{
83 if(!j.dismissed_)j.execute();
103 template<
class T1,
class T2 >
107 template<
class T1,
class T2,
class T3 >
111 template<
class T1,
class T2,
class T3,
class T4 >
115 template<
class T1,
class T2,
class T3,
class T4,
class T5 >
116 null_guard(
const T1&,
const T2&,
const T3&,
const T4&,
const T5& )
120 template<
bool cond,
class T >
145 template<
bool cond,
typename F>
146 inline typename null_guard_return<cond,scope_guard_impl0<F> >
::type
152 template<
typename C,
typename F>
153 inline typename null_guard_return<C::value,scope_guard_impl0<F> >
::type
156 return make_guard_if<C::value>(fun);
159 template<
typename F,
typename P1>
172 template<
typename F,
typename P1>
178 template<
bool cond,
typename F,
typename P1>
179 inline typename null_guard_return<cond,scope_guard_impl1<F,P1> >
::type
185 template<
typename C,
typename F,
typename P1>
186 inline typename null_guard_return<C::value,scope_guard_impl1<F,P1> >
::type
189 return make_guard_if_c<C::value>(fun,p1);
192 template<
typename F,
typename P1,
typename P2>
206 template<
typename F,
typename P1,
typename P2>
212 template<
bool cond,
typename F,
typename P1,
typename P2>
213 inline typename null_guard_return<cond,scope_guard_impl2<F,P1,P2> >
::type
219 template<
typename C,
typename F,
typename P1,
typename P2>
220 inline typename null_guard_return<C::value,scope_guard_impl2<F,P1,P2> >
::type
223 return make_guard_if_c<C::value>(fun,p1,p2);
226 template<
typename F,
typename P1,
typename P2,
typename P3>
241 template<
typename F,
typename P1,
typename P2,
typename P3>
247 template<
bool cond,
typename F,
typename P1,
typename P2,
typename P3>
248 inline typename null_guard_return<cond,scope_guard_impl3<F,P1,P2,P3> >
::type
254 template<
typename C,
typename F,
typename P1,
typename P2,
typename P3>
255 inline typename null_guard_return< C::value,scope_guard_impl3<F,P1,P2,P3> >
::type
258 return make_guard_if_c<C::value>(fun,p1,p2,p3);
261 template<
typename F,
typename P1,
typename P2,
typename P3,
typename P4>
278 template<
typename F,
typename P1,
typename P2,
typename P3,
typename P4>
280 F fun,P1 p1,P2 p2,P3 p3,P4 p4)
285 template<
bool cond,
typename F,
typename P1,
typename P2,
typename P3,
typename P4>
286 inline typename null_guard_return<cond,scope_guard_impl4<F,P1,P2,P3,P4> >
::type
288 F fun,P1 p1,P2 p2,P3 p3,P4 p4)
293 template<
typename C,
typename F,
typename P1,
typename P2,
typename P3,
typename P4>
294 inline typename null_guard_return<C::value,scope_guard_impl4<F,P1,P2,P3,P4> >
::type
296 F fun,P1 p1,P2 p2,P3 p3,P4 p4)
298 return make_guard_if_c<C::value>(fun,p1,p2,p3,p4);
301 template<
class Obj,
typename MemFun>
314 template<
class Obj,
typename MemFun>
320 template<
bool cond,
class Obj,
typename MemFun>
321 inline typename null_guard_return<cond,obj_scope_guard_impl0<Obj,MemFun> >
::type
327 template<
typename C,
class Obj,
typename MemFun>
328 inline typename null_guard_return<C::value,obj_scope_guard_impl0<Obj,MemFun> >
::type
331 return make_obj_guard_if_c<C::value>(obj,mem_fun);
334 template<
class Obj,
typename MemFun,
typename P1>
349 template<
class Obj,
typename MemFun,
typename P1>
351 Obj& obj,MemFun mem_fun,P1 p1)
356 template<
bool cond,
class Obj,
typename MemFun,
typename P1>
357 inline typename null_guard_return<cond,obj_scope_guard_impl1<Obj,MemFun,P1> >
::type
363 template<
typename C,
class Obj,
typename MemFun,
typename P1>
364 inline typename null_guard_return<C::value,obj_scope_guard_impl1<Obj,MemFun,P1> >
::type
367 return make_obj_guard_if_c<C::value>(obj,mem_fun,p1);
370 template<
class Obj,
typename MemFun,
typename P1,
typename P2>
387 template<
class Obj,
typename MemFun,
typename P1,
typename P2>
394 template<
bool cond,
class Obj,
typename MemFun,
typename P1,
typename P2>
395 inline typename null_guard_return<cond,obj_scope_guard_impl2<Obj,MemFun,P1,P2> >
::type
401 template<
typename C,
class Obj,
typename MemFun,
typename P1,
typename P2>
402 inline typename null_guard_return<C::value,obj_scope_guard_impl2<Obj,MemFun,P1,P2> >
::type
405 return make_obj_guard_if_c<C::value>(obj,mem_fun,p1,p2);
408 template<
class Obj,
typename MemFun,
typename P1,
typename P2,
typename P3>
426 template<
class Obj,
typename MemFun,
typename P1,
typename P2,
typename P3>
433 template<
bool cond,
class Obj,
typename MemFun,
typename P1,
typename P2,
typename P3>
434 inline typename null_guard_return<cond,obj_scope_guard_impl3<Obj,MemFun,P1,P2,P3> >
::type
440 template<
typename C,
class Obj,
typename MemFun,
typename P1,
typename P2,
typename P3>
441 inline typename null_guard_return<C::value,obj_scope_guard_impl3<Obj,MemFun,P1,P2,P3> >
::type
444 return make_obj_guard_if_c<C::value>(obj,mem_fun,p1,p2,p3);