1 // -- Boost Lambda Library -- exceptions.hpp ----------------
3 // Copyright (C) 2000 Gary Powell (gwpowell@hotmail.com)
4 // Copyright (C) 1999, 2000 Jaakko Jarvi (jaakko.jarvi@cs.utu.fi)
6 // Distributed under the Boost Software License, Version 1.0. (See
7 // accompanying file LICENSE_1_0.txt or copy at
8 // http://www.boost.org/LICENSE_1_0.txt)
10 // For more information, see http://www.boost.org
12 // -----------------------------------------------------
14 #if !defined(BOOST_LAMBDA_EXCEPTIONS_HPP)
15 #define BOOST_LAMBDA_EXCEPTIONS_HPP
17 #include "boost/lambda/core.hpp"
18 #include "boost/lambda/detail/control_constructs_common.hpp"
23 typedef lambda_functor<placeholder<EXCEPTION> > placeholderE_type;
26 boost::lambda::placeholderE_type freeE;
27 boost::lambda::placeholderE_type& _e = freeE;
30 // -- exception related actions -------------------
33 template <class Catch1, class Catch2 = null_type, class Catch3 = null_type,
34 class Catch4 = null_type, class Catch5 = null_type,
35 class Catch6 = null_type, class Catch7 = null_type,
36 class Catch8 = null_type, class Catch9 = null_type,
37 class Catch10 = null_type>
38 struct catch_action {};
40 struct catch_all_action {};
42 template<class CatchActions>
43 struct return_try_catch_action {};
45 template<class CatchActions>
46 struct try_catch_action {};
49 struct throw_new_action {};
50 struct rethrow_action {};
52 template<class ThrowType> struct throw_action;
55 struct throw_action<rethrow_action> {
62 template<> struct throw_action<throw_new_action> {
63 template<class RET, class T>
64 static RET apply(T& t) {
69 // return types for throw_actions --------------------------------------------
71 template<class T, class Any>
73 return_type_N<throw_action<T>, Any> {
78 // return types deductions -------------------------------------------------
80 // the return type of try_catch is the return type of the try lambda_functor
81 // (the return types of try and catch parts must match unless try returns void
82 // or the catch part throws for sure)
84 // NOTE, the exception placeholder deduction rule is defined
85 // in return_type_traits.hpp
89 // defined in control_constructs
90 class ifthenelse_action;
94 // Templates for deducing, wether a lambda_functor throws inevitably of not -
95 // This mechanism is needed to make the compiler happy about
96 // return types of try and catch parts.
98 // a lambda_functor throws for sure if:
99 // - it is a throw expression
100 // - it is a comma expression, and one of its arguments throws for sure
101 // - it is an if_then_else expression and either the if statement or both
102 // the then and else throw.
103 // (there are other cases as well, but we do not cover them)
104 // e.g. _1 + (rethrow(), 3) does throw for sure but this is not checked
105 // This implies, that in such a case, the return types of try and catch parts
106 // must match if the try part returns other than void.
107 // (Such checks could be done though)
110 struct throws_for_sure_phase2 {
111 static const bool value = false;
114 template <int N, class ThrowType, class Args>
115 struct throws_for_sure_phase2<
117 lambda_functor_base<action<N, throw_action<ThrowType> >, Args>
121 static const bool value = true;
124 // Both then and else or the if throw of an if_then_else.
125 template <class Args>
126 struct throws_for_sure_phase2<
129 ifthenelse_action, Args
134 static const bool value =
135 throws_for_sure_phase2<
136 typename boost::tuples::element<0, Args>::type>::value
139 throws_for_sure_phase2<
140 typename boost::tuples::element<1, Args>::type
143 throws_for_sure_phase2<
144 typename boost::tuples::element<2, Args>::type
149 template <class Args>
150 struct throws_for_sure_phase2<
152 lambda_functor_base< other_action<comma_action>, Args>
156 static const bool value =
157 throws_for_sure_phase2<
158 typename boost::tuples::element<0, Args>::type
161 throws_for_sure_phase2<
162 typename boost::tuples::element<1, Args>::type
166 // get rid of any qualifiers and references
167 // lambda_functors should be stored like that, so this is to be extra sure
169 struct throws_for_sure {
170 static const bool value
171 = throws_for_sure_phase2<
172 typename detail::remove_reference_and_cv<Arg>::type
177 // -- return_or_throw templates -----------------------------
179 // false case, catch and try return types are incompatible
180 // Now the catch part must throw for sure, otherwise a compile time error
182 template<bool is_conversion>
183 struct return_or_throw_phase2 {
184 template<class RET, class Arg, CALL_TEMPLATE_ARGS>
185 static RET call(Arg& arg, CALL_FORMAL_ARGS) {
186 BOOST_STATIC_ASSERT(throws_for_sure<Arg>::value);
187 detail::select(arg, CALL_ACTUAL_ARGS); // this line throws
188 throw 1; // this line is never performed, hence 1 is just a dummy
189 // The line is needed to make compiler happy and not require
190 // a matching return type
194 // the try and catch return types are compatible
196 struct return_or_throw_phase2<true> {
197 template<class RET, class Arg, CALL_TEMPLATE_ARGS>
198 static RET call(Arg& arg, CALL_FORMAL_ARGS) {
199 return detail::select(arg, CALL_ACTUAL_ARGS);
204 // the non-void case. Try part returns a value, so catch parts must
205 // return a value of the same type or throw
206 template<class RET, class ARG>
207 struct return_or_throw {
208 // Arg should be equal to ARG except that ARG may be a reference
209 // to be sure, that there are no suprises for peculiarly defined return types
210 // ARG is passed explicitely
211 template<class Arg, CALL_TEMPLATE_ARGS>
212 static RET call(Arg& arg, CALL_FORMAL_ARGS)
214 // typedef typename Arg::return_type<ARG, open_args<A&, B&, C&> >::type RT;
215 typedef typename as_lambda_functor<ARG>::type lf_type;
216 typedef typename lf_type::inherited::template
217 sig<tuple<CALL_REFERENCE_TYPES> >::type RT;
220 return_or_throw_phase2<
221 ::boost::is_convertible<RT, RET>::value
222 >::template call<RET>(arg, CALL_ACTUAL_ARGS);
226 // if try part returns void, we do not return the catch parts either
228 struct return_or_throw<void, ARG> {
229 template<class Arg, CALL_TEMPLATE_ARGS>
230 static void call(Arg& arg, CALL_FORMAL_ARGS) { detail::select(arg, CALL_ACTUAL_ARGS); }
235 // Throwing exceptions ---------------------------------------------
239 template <class T> struct catch_block {};
240 struct catch_all_block {};
242 template <class T> struct exception_catch_tag {};
244 // normal catch block is represented as
245 // tagged_lambda_functor<exception_catch_tag<catch_type<T> > >, LambdaFunctor>
247 // the default catch all block as:
248 // tagged_lambda_functor<exception_catch_tag<catch_all_block> >, LambdaFunctor>
253 // the code is RETHROW, this ensures that a compile time error results,
254 // if this lambda_functor is used outside a delayed catch_expression
258 action<0, throw_action<rethrow_action> >,
265 action<0, throw_action<rethrow_action> >,
271 template <class Arg1>
275 action<1, throw_action<throw_new_action> >,
276 tuple<typename const_copy_argument<const Arg1>::type>
279 throw_exception(const Arg1& a1) {
282 action<1, throw_action<throw_new_action> >,
283 tuple<typename const_copy_argument<const Arg1>::type>
285 ( tuple<typename const_copy_argument<const Arg1>::type>(a1));
288 // create catch blocks
289 template <class CatchType, class Arg>
291 tagged_lambda_functor<
292 detail::exception_catch_tag<detail::catch_block<CatchType> >,
295 catch_exception(const lambda_functor<Arg>& a) {
296 // the third placeholder cannot be used in catch_exception
297 // BOOST_STATIC_ASSERT((!has_placeholder<Arg, THIRD>::value));
299 tagged_lambda_functor<
300 detail::exception_catch_tag<detail::catch_block<CatchType> >,
305 // catch and do nothing case.
306 template <class CatchType>
308 tagged_lambda_functor<
309 detail::exception_catch_tag<detail::catch_block<CatchType> >,
319 tagged_lambda_functor<
320 detail::exception_catch_tag<detail::catch_block<CatchType> >,
330 // create catch(...) blocks
333 tagged_lambda_functor<
334 detail::exception_catch_tag<detail::catch_all_block>,
337 catch_all(const lambda_functor<Arg>& a) {
338 // the third placeholder cannot be used in catch_exception
339 BOOST_STATIC_ASSERT((!has_placeholder<Arg, THIRD>::value));
341 tagged_lambda_functor<
342 detail::exception_catch_tag<detail::catch_all_block>,
347 // catch(...) and do nothing case.
349 tagged_lambda_functor<
350 detail::exception_catch_tag<detail::catch_all_block>,
360 tagged_lambda_functor<
361 detail::exception_catch_tag<detail::catch_all_block>,
371 // try_catch functions --------------------------------
372 // The second -> N argument(s) are must be catch lambda_functors
373 template <class TryArg, class Catch1, class LF1>
377 action<2, try_catch_action<catch_action<Catch1> > >,
378 tuple<lambda_functor<TryArg>, LF1>
382 const lambda_functor<TryArg>& a1,
383 const tagged_lambda_functor<detail::exception_catch_tag<Catch1>, LF1>& a2)
387 action<2, try_catch_action<catch_action<Catch1> > >,
388 tuple<lambda_functor<TryArg>, LF1>
390 ( tuple< lambda_functor<TryArg>, LF1>(a1, a2));
393 template <class TryArg, class Catch1, class LF1,
394 class Catch2, class LF2>
398 action<3, try_catch_action<catch_action<detail::catch_block<Catch1>, Catch2> > >,
399 tuple<lambda_functor<TryArg>, LF1, LF2>
403 const lambda_functor<TryArg>& a1,
404 const tagged_lambda_functor<detail::exception_catch_tag<detail::catch_block<Catch1> >, LF1>& a2,
405 const tagged_lambda_functor<detail::exception_catch_tag<Catch2>, LF2>& a3)
409 action<3, try_catch_action<catch_action<detail::catch_block<Catch1>, Catch2> > >,
410 tuple<lambda_functor<TryArg>, LF1, LF2>
412 ( tuple<lambda_functor<TryArg>, LF1, LF2>(a1, a2, a3));
415 template <class TryArg, class Catch1, class LF1,
416 class Catch2, class LF2,
417 class Catch3, class LF3>
418 inline const lambda_functor<
420 action<4, try_catch_action<catch_action<detail::catch_block<Catch1>, detail::catch_block<Catch2>, Catch3> > >,
421 tuple<lambda_functor<TryArg>, LF1, LF2, LF3>
425 const lambda_functor<TryArg>& a1,
426 const tagged_lambda_functor<detail::exception_catch_tag<detail::catch_block<Catch1> >, LF1>& a2,
427 const tagged_lambda_functor<detail::exception_catch_tag<detail::catch_block<Catch2> >, LF2>& a3,
428 const tagged_lambda_functor<detail::exception_catch_tag<Catch3>, LF3>& a4)
432 action<4, try_catch_action<catch_action<detail::catch_block<Catch1>, detail::catch_block<Catch2>, Catch3> > >,
433 tuple<lambda_functor<TryArg>, LF1, LF2, LF3>
435 ( tuple<lambda_functor<TryArg>, LF1, LF2, LF3>(a1, a2, a3, a4));
438 template <class TryArg, class Catch1, class LF1,
439 class Catch2, class LF2,
440 class Catch3, class LF3,
441 class Catch4, class LF4>
448 catch_action<detail::catch_block<Catch1>, detail::catch_block<Catch2>, detail::catch_block<Catch3>, Catch4>
451 tuple<lambda_functor<TryArg>, LF1, LF2, LF3, LF4>
455 const lambda_functor<TryArg>& a1,
456 const tagged_lambda_functor<detail::exception_catch_tag<detail::catch_block<Catch1> >, LF1>& a2,
457 const tagged_lambda_functor<detail::exception_catch_tag<detail::catch_block<Catch2> >, LF2>& a3,
458 const tagged_lambda_functor<detail::exception_catch_tag<detail::catch_block<Catch3> >, LF3>& a4,
459 const tagged_lambda_functor<detail::exception_catch_tag<Catch4>, LF4>& a5)
465 try_catch_action<catch_action<detail::catch_block<Catch1>, detail::catch_block<Catch2>, detail::catch_block<Catch3>, Catch4> >
467 tuple<lambda_functor<TryArg>, LF1, LF2, LF3, LF4>
469 ( tuple<lambda_functor<TryArg>, LF1, LF2, LF3, LF4>(a1, a2, a3, a4, a5));
472 template <class TryArg, class Catch1, class LF1,
473 class Catch2, class LF2,
474 class Catch3, class LF3,
475 class Catch4, class LF4,
476 class Catch5, class LF5>
482 try_catch_action<catch_action<detail::catch_block<Catch1>, detail::catch_block<Catch2>, detail::catch_block<Catch3>, detail::catch_block<Catch4>, Catch5> >
484 tuple<lambda_functor<TryArg>, LF1, LF2, LF3, LF4, LF5>
488 const lambda_functor<TryArg>& a1,
489 const tagged_lambda_functor<detail::exception_catch_tag<detail::catch_block<Catch1> >, LF1>& a2,
490 const tagged_lambda_functor<detail::exception_catch_tag<detail::catch_block<Catch2> >, LF2>& a3,
491 const tagged_lambda_functor<detail::exception_catch_tag<detail::catch_block<Catch3> >, LF3>& a4,
492 const tagged_lambda_functor<detail::exception_catch_tag<detail::catch_block<Catch4> >, LF4>& a5,
493 const tagged_lambda_functor<detail::exception_catch_tag<Catch5>, LF5>& a6)
500 catch_action<detail::catch_block<Catch1>, detail::catch_block<Catch2>, detail::catch_block<Catch3>, detail::catch_block<Catch4>, Catch5>
503 tuple<lambda_functor<TryArg>, LF1, LF2, LF3, LF4, LF5>
505 ( tuple<lambda_functor<TryArg>, LF1, LF2, LF3, LF4, LF5>
506 (a1, a2, a3, a4, a5, a6)
510 template <class TryArg, class Catch1, class LF1,
511 class Catch2, class LF2,
512 class Catch3, class LF3,
513 class Catch4, class LF4,
514 class Catch5, class LF5,
515 class Catch6, class LF6>
522 catch_action<detail::catch_block<Catch1>, detail::catch_block<Catch2>, detail::catch_block<Catch3>, detail::catch_block<Catch4>, detail::catch_block<Catch5>, Catch6>
525 tuple<lambda_functor<TryArg>, LF1, LF2, LF3, LF4, LF5, LF6>
529 const lambda_functor<TryArg>& a1,
530 const tagged_lambda_functor<detail::exception_catch_tag<detail::catch_block<Catch1> >, LF1>& a2,
531 const tagged_lambda_functor<detail::exception_catch_tag<detail::catch_block<Catch2> >, LF2>& a3,
532 const tagged_lambda_functor<detail::exception_catch_tag<detail::catch_block<Catch3> >, LF3>& a4,
533 const tagged_lambda_functor<detail::exception_catch_tag<detail::catch_block<Catch4> >, LF4>& a5,
534 const tagged_lambda_functor<detail::exception_catch_tag<detail::catch_block<Catch5> >, LF5>& a6,
535 const tagged_lambda_functor<detail::exception_catch_tag<Catch6>, LF6>& a7)
542 catch_action<detail::catch_block<Catch1>, detail::catch_block<Catch2>, detail::catch_block<Catch3>, detail::catch_block<Catch4>, detail::catch_block<Catch5>,Catch6>
545 tuple<lambda_functor<TryArg>, LF1, LF2, LF3, LF4, LF5, LF6>
547 ( tuple<lambda_functor<TryArg>, LF1, LF2, LF3, LF4, LF5, LF6>
548 (a1, a2, a3, a4, a5, a6, a7));
551 template <class TryArg, class Catch1, class LF1,
552 class Catch2, class LF2,
553 class Catch3, class LF3,
554 class Catch4, class LF4,
555 class Catch5, class LF5,
556 class Catch6, class LF6,
557 class Catch7, class LF7>
564 catch_action<detail::catch_block<Catch1>, detail::catch_block<Catch2>, detail::catch_block<Catch3>, detail::catch_block<Catch4>, detail::catch_block<Catch5>, detail::catch_block<Catch6>, Catch7>
567 tuple<lambda_functor<TryArg>, LF1, LF2, LF3, LF4, LF5, LF6, LF7>
571 const lambda_functor<TryArg>& a1,
572 const tagged_lambda_functor<detail::exception_catch_tag<detail::catch_block<Catch1> >, LF1>& a2,
573 const tagged_lambda_functor<detail::exception_catch_tag<detail::catch_block<Catch2> >, LF2>& a3,
574 const tagged_lambda_functor<detail::exception_catch_tag<detail::catch_block<Catch3> >, LF3>& a4,
575 const tagged_lambda_functor<detail::exception_catch_tag<detail::catch_block<Catch4> >, LF4>& a5,
576 const tagged_lambda_functor<detail::exception_catch_tag<detail::catch_block<Catch5> >, LF5>& a6,
577 const tagged_lambda_functor<detail::exception_catch_tag<detail::catch_block<Catch6> >, LF6>& a7,
578 const tagged_lambda_functor<detail::exception_catch_tag<Catch7>, LF7>& a8)
586 detail::catch_block<Catch1>, detail::catch_block<Catch2>, detail::catch_block<Catch3>, detail::catch_block<Catch4>, detail::catch_block<Catch5>, detail::catch_block<Catch6>, Catch7
590 tuple<lambda_functor<TryArg>, LF1, LF2, LF3, LF4, LF5, LF6, LF7>
592 ( tuple<lambda_functor<TryArg>, LF1, LF2, LF3, LF4, LF5, LF6, LF7>
593 (a1, a2, a3, a4, a5, a6, a7, a8));
596 template <class TryArg, class Catch1, class LF1,
597 class Catch2, class LF2,
598 class Catch3, class LF3,
599 class Catch4, class LF4,
600 class Catch5, class LF5,
601 class Catch6, class LF6,
602 class Catch7, class LF7,
603 class Catch8, class LF8>
611 detail::catch_block<Catch1>, detail::catch_block<Catch2>, detail::catch_block<Catch3>, detail::catch_block<Catch4>, detail::catch_block<Catch5>, detail::catch_block<Catch6>, detail::catch_block<Catch7>, Catch8
615 tuple<lambda_functor<TryArg>, LF1, LF2, LF3, LF4, LF5, LF6, LF7, LF8>
619 const lambda_functor<TryArg>& a1,
620 const tagged_lambda_functor<detail::exception_catch_tag<detail::catch_block<Catch1> >, LF1>& a2,
621 const tagged_lambda_functor<detail::exception_catch_tag<detail::catch_block<Catch2> >, LF2>& a3,
622 const tagged_lambda_functor<detail::exception_catch_tag<detail::catch_block<Catch3> >, LF3>& a4,
623 const tagged_lambda_functor<detail::exception_catch_tag<detail::catch_block<Catch4> >, LF4>& a5,
624 const tagged_lambda_functor<detail::exception_catch_tag<detail::catch_block<Catch5> >, LF5>& a6,
625 const tagged_lambda_functor<detail::exception_catch_tag<detail::catch_block<Catch6> >, LF6>& a7,
626 const tagged_lambda_functor<detail::exception_catch_tag<detail::catch_block<Catch7> >, LF7>& a8,
627 const tagged_lambda_functor<detail::exception_catch_tag<Catch8>, LF8>& a9)
635 detail::catch_block<Catch1>, detail::catch_block<Catch2>, detail::catch_block<Catch3>, detail::catch_block<Catch4>, detail::catch_block<Catch5>, detail::catch_block<Catch6>, detail::catch_block<Catch7>, Catch8
639 tuple<lambda_functor<TryArg>, LF1, LF2, LF3, LF4, LF5, LF6, LF7, LF8>
641 ( tuple<lambda_functor<TryArg>, LF1, LF2, LF3, LF4, LF5, LF6, LF7, LF8>
642 (a1, a2, a3, a4, a5, a6, a7, a8, a9));
645 template <class TryArg, class Catch1, class LF1,
646 class Catch2, class LF2,
647 class Catch3, class LF3,
648 class Catch4, class LF4,
649 class Catch5, class LF5,
650 class Catch6, class LF6,
651 class Catch7, class LF7,
652 class Catch8, class LF8,
653 class Catch9, class LF9>
661 detail::catch_block<Catch1>, detail::catch_block<Catch2>, detail::catch_block<Catch3>, detail::catch_block<Catch4>, detail::catch_block<Catch5>, detail::catch_block<Catch6>, detail::catch_block<Catch7>, detail::catch_block<Catch8>,
667 lambda_functor<TryArg>, LF1, LF2, LF3, LF4, LF5, LF6, LF7, LF8, LF9
672 const lambda_functor<TryArg>& a1,
673 const tagged_lambda_functor<detail::exception_catch_tag<detail::catch_block<Catch1> >, LF1>& a2,
674 const tagged_lambda_functor<detail::exception_catch_tag<detail::catch_block<Catch2> >, LF2>& a3,
675 const tagged_lambda_functor<detail::exception_catch_tag<detail::catch_block<Catch3> >, LF3>& a4,
676 const tagged_lambda_functor<detail::exception_catch_tag<detail::catch_block<Catch4> >, LF4>& a5,
677 const tagged_lambda_functor<detail::exception_catch_tag<detail::catch_block<Catch5> >, LF5>& a6,
678 const tagged_lambda_functor<detail::exception_catch_tag<detail::catch_block<Catch6> >, LF6>& a7,
679 const tagged_lambda_functor<detail::exception_catch_tag<detail::catch_block<Catch7> >, LF7>& a8,
680 const tagged_lambda_functor<detail::exception_catch_tag<detail::catch_block<Catch8> >, LF8>& a9,
681 const tagged_lambda_functor<detail::exception_catch_tag<Catch9>, LF9>& a10)
689 detail::catch_block<Catch1>, detail::catch_block<Catch2>, detail::catch_block<Catch3>, detail::catch_block<Catch4>, detail::catch_block<Catch5>, detail::catch_block<Catch6>, detail::catch_block<Catch7>, detail::catch_block<Catch8>,
695 lambda_functor<TryArg>, LF1, LF2, LF3, LF4, LF5, LF6, LF7, LF8, LF9
699 lambda_functor<TryArg>, LF1, LF2, LF3, LF4, LF5, LF6, LF7, LF8, LF9
700 >(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10));
704 // ---------------------------------------------------------------------------
705 // Specializations for lambda_functor_base of try_catch ----------------------
709 template<class Args, class Catch1>
710 class lambda_functor_base<
711 action<2, try_catch_action<catch_action<detail::catch_block<Catch1> > > >,
718 explicit lambda_functor_base(const Args& a) : args(a) {}
720 // the return type of try_catch is the return type of the try lambda_functor
721 // (the return types of try and catch parts must match unless try returns void
722 // or the catch part throws for sure)
724 template <class SigArgs> struct sig {
727 typename boost::tuples::element<0, Args>::type
730 typedef typename lf_type::inherited::template sig<SigArgs>::type type;
733 template<class RET, CALL_TEMPLATE_ARGS>
734 RET call(CALL_FORMAL_ARGS) const {
737 return detail::select(::boost::tuples::get<0>(args), CALL_ACTUAL_ARGS);
742 detail::return_or_throw<RET, typename ::boost::tuples::element<1, Args>::type>
743 ::call(::boost::tuples::get<1>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
751 class lambda_functor_base<action<2, try_catch_action<catch_action<detail::catch_all_block> > >, Args> {
755 explicit lambda_functor_base(const Args& a) : args(a) {}
757 template <class SigArgs> struct sig {
760 typename boost::tuples::element<0, Args>::type
763 typedef typename lf_type::inherited::template sig<SigArgs>::type type;
766 template<class RET, CALL_TEMPLATE_ARGS>
767 RET call(CALL_FORMAL_ARGS) const {
770 return detail::select(::boost::tuples::get<0>(args), CALL_ACTUAL_ARGS);
775 detail::return_or_throw<RET, typename ::boost::tuples::element<1, Args>::type>
776 ::call(::boost::tuples::get<1>(args), CALL_ACTUAL_ARGS);
782 // 2 catch types case
783 template<class Args, class Catch1, class Catch2>
784 class lambda_functor_base<action<3, try_catch_action<catch_action<detail::catch_block<Catch1>, detail::catch_block<Catch2> > > >, Args> {
788 explicit lambda_functor_base(const Args& a) : args(a) {}
790 template <class SigArgs> struct sig {
793 typename boost::tuples::element<0, Args>::type
796 typedef typename lf_type::inherited::template sig<SigArgs>::type type;
799 template<class RET, CALL_TEMPLATE_ARGS>
800 RET call(CALL_FORMAL_ARGS) const {
803 return detail::select(::boost::tuples::get<0>(args), CALL_ACTUAL_ARGS);
808 detail::return_or_throw<RET, typename ::boost::tuples::element<1, Args>::type>
809 ::call(::boost::tuples::get<1>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
814 detail::return_or_throw<RET, typename ::boost::tuples::element<2, Args>::type>
815 ::call(::boost::tuples::get<2>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
820 template<class Args, class Catch1>
821 class lambda_functor_base<action<3, try_catch_action<catch_action<detail::catch_block<Catch1>,detail::catch_all_block> > >, Args> {
825 explicit lambda_functor_base(const Args& a) : args(a) {}
827 template <class SigArgs> struct sig {
830 typename boost::tuples::element<0, Args>::type
833 typedef typename lf_type::inherited::template sig<SigArgs>::type type;
836 template<class RET, CALL_TEMPLATE_ARGS>
837 RET call(CALL_FORMAL_ARGS) const {
840 return detail::select(::boost::tuples::get<0>(args), CALL_ACTUAL_ARGS);
845 detail::return_or_throw<RET, typename ::boost::tuples::element<1, Args>::type>
846 ::call(::boost::tuples::get<1>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
851 detail::return_or_throw<RET, typename ::boost::tuples::element<2, Args>::type>
852 ::call(::boost::tuples::get<2>(args), CALL_ACTUAL_ARGS);
857 // 3 catch types case
858 template<class Args, class Catch1, class Catch2, class Catch3>
859 class lambda_functor_base<action<4, try_catch_action<catch_action<detail::catch_block<Catch1>, detail::catch_block<Catch2>, detail::catch_block<Catch3> > > >, Args> {
863 explicit lambda_functor_base(const Args& a) : args(a) {}
865 template <class SigArgs> struct sig {
868 typename boost::tuples::element<0, Args>::type
871 typedef typename lf_type::inherited::template sig<SigArgs>::type type;
874 template<class RET, CALL_TEMPLATE_ARGS>
875 RET call(CALL_FORMAL_ARGS) const {
878 return detail::select(::boost::tuples::get<0>(args), CALL_ACTUAL_ARGS);
883 detail::return_or_throw<RET, typename ::boost::tuples::element<1, Args>::type>
884 ::call(::boost::tuples::get<1>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
890 detail::return_or_throw<RET, typename ::boost::tuples::element<2, Args>::type>
891 ::call(::boost::tuples::get<2>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
897 detail::return_or_throw<RET, typename ::boost::tuples::element<3, Args>::type>
898 ::call(::boost::tuples::get<3>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
903 template<class Args, class Catch1, class Catch2>
904 class lambda_functor_base<action<4, try_catch_action<catch_action<detail::catch_block<Catch1>, detail::catch_block<Catch2>,detail::catch_all_block> > >, Args> {
908 explicit lambda_functor_base(const Args& a) : args(a) {}
910 template <class SigArgs> struct sig {
913 typename boost::tuples::element<0, Args>::type
916 typedef typename lf_type::inherited::template sig<SigArgs>::type type;
919 template<class RET, CALL_TEMPLATE_ARGS>
920 RET call(CALL_FORMAL_ARGS) const {
923 return detail::select(::boost::tuples::get<0>(args), CALL_ACTUAL_ARGS);
928 detail::return_or_throw<RET, typename ::boost::tuples::element<1, Args>::type>
929 ::call(::boost::tuples::get<1>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
934 detail::return_or_throw<RET, typename ::boost::tuples::element<2, Args>::type>
935 ::call(::boost::tuples::get<2>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
940 detail::return_or_throw<RET, typename ::boost::tuples::element<3, Args>::type>
941 ::call(::boost::tuples::get<3>(args), CALL_ACTUAL_ARGS);
946 // 4 catch types case
947 template<class Args, class Catch1, class Catch2, class Catch3, class Catch4>
948 class lambda_functor_base<action<5, try_catch_action<catch_action<detail::catch_block<Catch1>, detail::catch_block<Catch2>, detail::catch_block<Catch3>, detail::catch_block<Catch4> > > >, Args> {
952 explicit lambda_functor_base(const Args& a) : args(a) {}
954 template <class SigArgs> struct sig {
957 typename boost::tuples::element<0, Args>::type
960 typedef typename lf_type::inherited::template sig<SigArgs>::type type;
963 template<class RET, CALL_TEMPLATE_ARGS>
964 RET call(CALL_FORMAL_ARGS) const {
967 return detail::select(::boost::tuples::get<0>(args), CALL_ACTUAL_ARGS);
972 detail::return_or_throw<RET, typename ::boost::tuples::element<1, Args>::type>
973 ::call(::boost::tuples::get<1>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
978 detail::return_or_throw<RET, typename ::boost::tuples::element<2, Args>::type>
979 ::call(::boost::tuples::get<2>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
984 detail::return_or_throw<RET, typename ::boost::tuples::element<3, Args>::type>
985 ::call(::boost::tuples::get<3>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
990 detail::return_or_throw<RET, typename ::boost::tuples::element<4, Args>::type>
991 ::call(::boost::tuples::get<4>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
996 template<class Args, class Catch1, class Catch2, class Catch3>
997 class lambda_functor_base<action<5, try_catch_action<catch_action<detail::catch_block<Catch1>, detail::catch_block<Catch2>, detail::catch_block<Catch3>,detail::catch_all_block> > >, Args> {
1001 explicit lambda_functor_base(const Args& a) : args(a) {}
1003 template <class SigArgs> struct sig {
1006 typename boost::tuples::element<0, Args>::type
1009 typedef typename lf_type::inherited::template sig<SigArgs>::type type;
1012 template<class RET, CALL_TEMPLATE_ARGS>
1013 RET call(CALL_FORMAL_ARGS) const {
1016 return detail::select(::boost::tuples::get<0>(args), CALL_ACTUAL_ARGS);
1021 detail::return_or_throw<RET, typename ::boost::tuples::element<1, Args>::type>
1022 ::call(::boost::tuples::get<1>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
1027 detail::return_or_throw<RET, typename ::boost::tuples::element<2, Args>::type>
1028 ::call(::boost::tuples::get<2>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
1033 detail::return_or_throw<RET, typename ::boost::tuples::element<3, Args>::type>
1034 ::call(::boost::tuples::get<3>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
1039 detail::return_or_throw<RET, typename ::boost::tuples::element<4, Args>::type>
1040 ::call(::boost::tuples::get<4>(args), CALL_ACTUAL_ARGS);
1045 // 5 catch types case
1046 template<class Args, class Catch1, class Catch2, class Catch3, class Catch4, class Catch5>
1047 class lambda_functor_base<action<6, try_catch_action<catch_action<detail::catch_block<Catch1>, detail::catch_block<Catch2>, detail::catch_block<Catch3>, detail::catch_block<Catch4>, detail::catch_block<Catch5> > > >, Args> {
1051 explicit lambda_functor_base(const Args& a) : args(a) {}
1053 template <class SigArgs> struct sig {
1056 typename boost::tuples::element<0, Args>::type
1059 typedef typename lf_type::inherited::template sig<SigArgs>::type type;
1062 template<class RET, CALL_TEMPLATE_ARGS>
1063 RET call(CALL_FORMAL_ARGS) const {
1066 return detail::select(::boost::tuples::get<0>(args), CALL_ACTUAL_ARGS);
1071 detail::return_or_throw<RET, typename ::boost::tuples::element<1, Args>::type>
1072 ::call(::boost::tuples::get<1>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
1077 detail::return_or_throw<RET, typename ::boost::tuples::element<2, Args>::type>
1078 ::call(::boost::tuples::get<2>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
1083 detail::return_or_throw<RET, typename ::boost::tuples::element<3, Args>::type>
1084 ::call(::boost::tuples::get<3>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
1089 detail::return_or_throw<RET, typename ::boost::tuples::element<4, Args>::type>
1090 ::call(::boost::tuples::get<4>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
1095 detail::return_or_throw<RET, typename ::boost::tuples::element<4, Args>::type>
1096 ::call(::boost::tuples::get<5>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
1101 template<class Args, class Catch1, class Catch2, class Catch3, class Catch4>
1102 class lambda_functor_base<action<6, try_catch_action<catch_action<detail::catch_block<Catch1>, detail::catch_block<Catch2>, detail::catch_block<Catch3>, detail::catch_block<Catch4>,detail::catch_all_block> > >, Args> {
1106 explicit lambda_functor_base(const Args& a) : args(a) {}
1108 template <class SigArgs> struct sig {
1111 typename boost::tuples::element<0, Args>::type
1114 typedef typename lf_type::inherited::template sig<SigArgs>::type type;
1117 template<class RET, CALL_TEMPLATE_ARGS>
1118 RET call(CALL_FORMAL_ARGS) const {
1121 return detail::select(::boost::tuples::get<0>(args), CALL_ACTUAL_ARGS);
1126 detail::return_or_throw<RET, typename ::boost::tuples::element<1, Args>::type>
1127 ::call(::boost::tuples::get<1>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
1132 detail::return_or_throw<RET, typename ::boost::tuples::element<2, Args>::type>
1133 ::call(::boost::tuples::get<2>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
1138 detail::return_or_throw<RET, typename ::boost::tuples::element<3, Args>::type>
1139 ::call(::boost::tuples::get<3>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
1144 detail::return_or_throw<RET, typename ::boost::tuples::element<4, Args>::type>
1145 ::call(::boost::tuples::get<4>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
1150 detail::return_or_throw<RET, typename ::boost::tuples::element<5, Args>::type>
1151 ::call(::boost::tuples::get<5>(args), CALL_ACTUAL_ARGS);
1156 // 6 catch types case
1157 template<class Args, class Catch1, class Catch2, class Catch3, class Catch4, class Catch5, class Catch6>
1158 class lambda_functor_base<action<7, try_catch_action<catch_action<detail::catch_block<Catch1>, detail::catch_block<Catch2>, detail::catch_block<Catch3>, detail::catch_block<Catch4>, detail::catch_block<Catch5>, detail::catch_block<Catch6> > > >, Args> {
1162 explicit lambda_functor_base(const Args& a) : args(a) {}
1164 template <class SigArgs> struct sig {
1167 typename boost::tuples::element<0, Args>::type
1170 typedef typename lf_type::inherited::template sig<SigArgs>::type type;
1173 template<class RET, CALL_TEMPLATE_ARGS>
1174 RET call(CALL_FORMAL_ARGS) const {
1177 return detail::select(::boost::tuples::get<0>(args), CALL_ACTUAL_ARGS);
1182 detail::return_or_throw<RET, typename ::boost::tuples::element<1, Args>::type>
1183 ::call(::boost::tuples::get<1>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
1188 detail::return_or_throw<RET, typename ::boost::tuples::element<2, Args>::type>
1189 ::call(::boost::tuples::get<2>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
1194 detail::return_or_throw<RET, typename ::boost::tuples::element<3, Args>::type>
1195 ::call(::boost::tuples::get<3>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
1200 detail::return_or_throw<RET, typename ::boost::tuples::element<4, Args>::type>
1201 ::call(::boost::tuples::get<4>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
1206 detail::return_or_throw<RET, typename ::boost::tuples::element<5, Args>::type>
1207 ::call(::boost::tuples::get<5>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
1212 detail::return_or_throw<RET, typename ::boost::tuples::element<6, Args>::type>
1213 ::call(::boost::tuples::get<6>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
1218 template<class Args, class Catch1, class Catch2, class Catch3, class Catch4, class Catch5>
1219 class lambda_functor_base<action<7, try_catch_action<catch_action<detail::catch_block<Catch1>, detail::catch_block<Catch2>, detail::catch_block<Catch3>, detail::catch_block<Catch4>, detail::catch_block<Catch5>,detail::catch_all_block> > >, Args> {
1223 explicit lambda_functor_base(const Args& a) : args(a) {}
1225 template <class SigArgs> struct sig {
1228 typename boost::tuples::element<0, Args>::type
1231 typedef typename lf_type::inherited::template sig<SigArgs>::type type;
1234 template<class RET, CALL_TEMPLATE_ARGS>
1235 RET call(CALL_FORMAL_ARGS) const {
1238 return detail::select(::boost::tuples::get<0>(args), CALL_ACTUAL_ARGS);
1243 detail::return_or_throw<RET, typename ::boost::tuples::element<1, Args>::type>
1244 ::call(::boost::tuples::get<1>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
1249 detail::return_or_throw<RET, typename ::boost::tuples::element<2, Args>::type>
1250 ::call(::boost::tuples::get<2>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
1255 detail::return_or_throw<RET, typename ::boost::tuples::element<3, Args>::type>
1256 ::call(::boost::tuples::get<3>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
1261 detail::return_or_throw<RET, typename ::boost::tuples::element<4, Args>::type>
1262 ::call(::boost::tuples::get<4>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
1267 detail::return_or_throw<RET, typename ::boost::tuples::element<5, Args>::type>
1268 ::call(::boost::tuples::get<5>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
1273 detail::return_or_throw<RET, typename ::boost::tuples::element<6, Args>::type>
1274 ::call(::boost::tuples::get<6>(args), CALL_ACTUAL_ARGS);
1279 // 7 catch types case
1280 template<class Args, class Catch1, class Catch2, class Catch3, class Catch4, class Catch5, class Catch6,
1282 class lambda_functor_base<action<8, try_catch_action<catch_action<detail::catch_block<Catch1>, detail::catch_block<Catch2>, detail::catch_block<Catch3>, detail::catch_block<Catch4>, detail::catch_block<Catch5>, detail::catch_block<Catch6>, detail::catch_block<Catch7> > > >, Args> {
1286 explicit lambda_functor_base(const Args& a) : args(a) {}
1288 template <class SigArgs> struct sig {
1291 typename boost::tuples::element<0, Args>::type
1294 typedef typename lf_type::inherited::template sig<SigArgs>::type type;
1297 template<class RET, CALL_TEMPLATE_ARGS>
1298 RET call(CALL_FORMAL_ARGS) const {
1301 return detail::select(::boost::tuples::get<0>(args), CALL_ACTUAL_ARGS);
1306 detail::return_or_throw<RET, typename ::boost::tuples::element<1, Args>::type>
1307 ::call(::boost::tuples::get<1>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
1312 detail::return_or_throw<RET, typename ::boost::tuples::element<2, Args>::type>
1313 ::call(::boost::tuples::get<2>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
1318 detail::return_or_throw<RET, typename ::boost::tuples::element<3, Args>::type>
1319 ::call(::boost::tuples::get<3>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
1324 detail::return_or_throw<RET, typename ::boost::tuples::element<4, Args>::type>
1325 ::call(::boost::tuples::get<4>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
1330 detail::return_or_throw<RET, typename ::boost::tuples::element<5, Args>::type>
1331 ::call(::boost::tuples::get<5>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
1336 detail::return_or_throw<RET, typename ::boost::tuples::element<6, Args>::type>
1337 ::call(::boost::tuples::get<6>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
1342 detail::return_or_throw<RET, typename ::boost::tuples::element<7, Args>::type>
1343 ::call(::boost::tuples::get<7>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
1348 template<class Args, class Catch1, class Catch2, class Catch3, class Catch4, class Catch5, class Catch6>
1349 class lambda_functor_base<action<8, try_catch_action<catch_action<detail::catch_block<Catch1>, detail::catch_block<Catch2>, detail::catch_block<Catch3>, detail::catch_block<Catch4>, detail::catch_block<Catch5>, detail::catch_block<Catch6>,
1350 detail::catch_all_block> > >, Args> {
1354 explicit lambda_functor_base(const Args& a) : args(a) {}
1356 template <class SigArgs> struct sig {
1359 typename boost::tuples::element<0, Args>::type
1362 typedef typename lf_type::inherited::template sig<SigArgs>::type type;
1365 template<class RET, CALL_TEMPLATE_ARGS>
1366 RET call(CALL_FORMAL_ARGS) const {
1369 return detail::select(::boost::tuples::get<0>(args), CALL_ACTUAL_ARGS);
1374 detail::return_or_throw<RET, typename ::boost::tuples::element<1, Args>::type>
1375 ::call(::boost::tuples::get<1>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
1380 detail::return_or_throw<RET, typename ::boost::tuples::element<2, Args>::type>
1381 ::call(::boost::tuples::get<2>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
1386 detail::return_or_throw<RET, typename ::boost::tuples::element<3, Args>::type>
1387 ::call(::boost::tuples::get<3>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
1392 detail::return_or_throw<RET, typename ::boost::tuples::element<4, Args>::type>
1393 ::call(::boost::tuples::get<4>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
1398 detail::return_or_throw<RET, typename ::boost::tuples::element<5, Args>::type>
1399 ::call(::boost::tuples::get<5>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
1404 detail::return_or_throw<RET, typename ::boost::tuples::element<6, Args>::type>
1405 ::call(::boost::tuples::get<6>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
1410 detail::return_or_throw<RET, typename ::boost::tuples::element<7, Args>::type>
1411 ::call(::boost::tuples::get<7>(args), CALL_ACTUAL_ARGS);
1416 // 8 catch types case
1417 template<class Args, class Catch1, class Catch2, class Catch3, class Catch4, class Catch5, class Catch6,
1418 class Catch7, class Catch8>
1419 class lambda_functor_base<action<9, try_catch_action<catch_action<detail::catch_block<Catch1>, detail::catch_block<Catch2>, detail::catch_block<Catch3>, detail::catch_block<Catch4>, detail::catch_block<Catch5>, detail::catch_block<Catch6>,
1420 detail::catch_block<Catch7>, detail::catch_block<Catch8> > > >, Args> {
1424 explicit lambda_functor_base(const Args& a) : args(a) {}
1426 template <class SigArgs> struct sig {
1429 typename boost::tuples::element<0, Args>::type
1432 typedef typename lf_type::inherited::template sig<SigArgs>::type type;
1435 template<class RET, CALL_TEMPLATE_ARGS>
1436 RET call(CALL_FORMAL_ARGS) const {
1439 return detail::select(::boost::tuples::get<0>(args), CALL_ACTUAL_ARGS);
1444 detail::return_or_throw<RET, typename ::boost::tuples::element<1, Args>::type>
1445 ::call(::boost::tuples::get<1>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
1450 detail::return_or_throw<RET, typename ::boost::tuples::element<2, Args>::type>
1451 ::call(::boost::tuples::get<2>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
1456 detail::return_or_throw<RET, typename ::boost::tuples::element<3, Args>::type>
1457 ::call(::boost::tuples::get<3>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
1462 detail::return_or_throw<RET, typename ::boost::tuples::element<4, Args>::type>
1463 ::call(::boost::tuples::get<4>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
1468 detail::return_or_throw<RET, typename ::boost::tuples::element<5, Args>::type>
1469 ::call(::boost::tuples::get<5>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
1474 detail::return_or_throw<RET, typename ::boost::tuples::element<6, Args>::type>
1475 ::call(::boost::tuples::get<6>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
1480 detail::return_or_throw<RET, typename ::boost::tuples::element<7, Args>::type>
1481 ::call(::boost::tuples::get<7>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
1486 detail::return_or_throw<RET, typename ::boost::tuples::element<8, Args>::type>
1487 ::call(::boost::tuples::get<8>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
1492 template<class Args, class Catch1, class Catch2, class Catch3, class Catch4, class Catch5, class Catch6,
1494 class lambda_functor_base<action<9, try_catch_action<catch_action<detail::catch_block<Catch1>, detail::catch_block<Catch2>, detail::catch_block<Catch3>, detail::catch_block<Catch4>, detail::catch_block<Catch5>, detail::catch_block<Catch6>,
1495 detail::catch_block<Catch7>,detail::catch_all_block> > >, Args> {
1499 explicit lambda_functor_base(const Args& a) : args(a) {}
1501 template <class SigArgs> struct sig {
1504 typename boost::tuples::element<0, Args>::type
1507 typedef typename lf_type::inherited::template sig<SigArgs>::type type;
1510 template<class RET, CALL_TEMPLATE_ARGS>
1511 RET call(CALL_FORMAL_ARGS) const {
1514 return detail::select(::boost::tuples::get<0>(args), CALL_ACTUAL_ARGS);
1519 detail::return_or_throw<RET, typename ::boost::tuples::element<1, Args>::type>
1520 ::call(::boost::tuples::get<1>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
1525 detail::return_or_throw<RET, typename ::boost::tuples::element<2, Args>::type>
1526 ::call(::boost::tuples::get<2>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
1531 detail::return_or_throw<RET, typename ::boost::tuples::element<3, Args>::type>
1532 ::call(::boost::tuples::get<3>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
1537 detail::return_or_throw<RET, typename ::boost::tuples::element<4, Args>::type>
1538 ::call(::boost::tuples::get<4>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
1543 detail::return_or_throw<RET, typename ::boost::tuples::element<5, Args>::type>
1544 ::call(::boost::tuples::get<5>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
1549 detail::return_or_throw<RET, typename ::boost::tuples::element<6, Args>::type>
1550 ::call(::boost::tuples::get<6>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
1555 detail::return_or_throw<RET, typename ::boost::tuples::element<7, Args>::type>
1556 ::call(::boost::tuples::get<7>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
1561 detail::return_or_throw<RET, typename ::boost::tuples::element<8, Args>::type>
1562 ::call(::boost::tuples::get<8>(args), CALL_ACTUAL_ARGS);
1567 // 9 catch types case
1568 template<class Args, class Catch1, class Catch2, class Catch3, class Catch4, class Catch5, class Catch6,
1569 class Catch7, class Catch8, class Catch9>
1570 class lambda_functor_base<action<10, try_catch_action<catch_action<detail::catch_block<Catch1>, detail::catch_block<Catch2>, detail::catch_block<Catch3>, detail::catch_block<Catch4>, detail::catch_block<Catch5>, detail::catch_block<Catch6>,
1571 detail::catch_block<Catch7>, detail::catch_block<Catch8>, detail::catch_block<Catch9> > > >, Args> {
1575 explicit lambda_functor_base(const Args& a) : args(a) {}
1577 template <class SigArgs> struct sig {
1580 typename boost::tuples::element<0, Args>::type
1583 typedef typename lf_type::inherited::template sig<SigArgs>::type type;
1586 template<class RET, CALL_TEMPLATE_ARGS>
1587 RET call(CALL_FORMAL_ARGS) const {
1590 return detail::select(::boost::tuples::get<0>(args), CALL_ACTUAL_ARGS);
1595 detail::return_or_throw<RET, typename ::boost::tuples::element<1, Args>::type>
1596 ::call(::boost::tuples::get<1>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
1601 detail::return_or_throw<RET, typename ::boost::tuples::element<2, Args>::type>
1602 ::call(::boost::tuples::get<2>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
1607 detail::return_or_throw<RET, typename ::boost::tuples::element<3, Args>::type>
1608 ::call(::boost::tuples::get<3>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
1613 detail::return_or_throw<RET, typename ::boost::tuples::element<4, Args>::type>
1614 ::call(::boost::tuples::get<4>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
1619 detail::return_or_throw<RET, typename ::boost::tuples::element<5, Args>::type>
1620 ::call(::boost::tuples::get<5>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
1625 detail::return_or_throw<RET, typename ::boost::tuples::element<6, Args>::type>
1626 ::call(::boost::tuples::get<6>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
1631 detail::return_or_throw<RET, typename ::boost::tuples::element<7, Args>::type>
1632 ::call(::boost::tuples::get<7>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
1637 detail::return_or_throw<RET, typename ::boost::tuples::element<8, Args>::type>
1638 ::call(::boost::tuples::get<8>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
1643 detail::return_or_throw<RET, typename ::boost::tuples::element<9, Args>::type>
1644 ::call(::boost::tuples::get<9>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
1649 template<class Args, class Catch1, class Catch2, class Catch3, class Catch4, class Catch5, class Catch6,
1650 class Catch7, class Catch8>
1651 class lambda_functor_base<action<10, try_catch_action<catch_action<detail::catch_block<Catch1>, detail::catch_block<Catch2>, detail::catch_block<Catch3>, detail::catch_block<Catch4>, detail::catch_block<Catch5>, detail::catch_block<Catch6>,
1652 detail::catch_block<Catch7>, detail::catch_block<Catch8>,detail::catch_all_block> > >, Args> {
1656 explicit lambda_functor_base(const Args& a) : args(a) {}
1658 template <class SigArgs> struct sig {
1661 typename boost::tuples::element<0, Args>::type
1664 typedef typename lf_type::inherited::template sig<SigArgs>::type type;
1667 template<class RET, CALL_TEMPLATE_ARGS>
1668 RET call(CALL_FORMAL_ARGS) const {
1671 return detail::select(::boost::tuples::get<0>(args), CALL_ACTUAL_ARGS);
1676 detail::return_or_throw<RET, typename ::boost::tuples::element<1, Args>::type>
1677 ::call(::boost::tuples::get<1>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
1682 detail::return_or_throw<RET, typename ::boost::tuples::element<2, Args>::type>
1683 ::call(::boost::tuples::get<2>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
1688 detail::return_or_throw<RET, typename ::boost::tuples::element<3, Args>::type>
1689 ::call(::boost::tuples::get<3>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
1694 detail::return_or_throw<RET, typename ::boost::tuples::element<4, Args>::type>
1695 ::call(::boost::tuples::get<4>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
1700 detail::return_or_throw<RET, typename ::boost::tuples::element<5, Args>::type>
1701 ::call(::boost::tuples::get<5>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
1706 detail::return_or_throw<RET, typename ::boost::tuples::element<6, Args>::type>
1707 ::call(::boost::tuples::get<6>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
1712 detail::return_or_throw<RET, typename ::boost::tuples::element<7, Args>::type>
1713 ::call(::boost::tuples::get<7>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
1718 detail::return_or_throw<RET, typename ::boost::tuples::element<8, Args>::type>
1719 ::call(::boost::tuples::get<8>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
1724 detail::return_or_throw<RET, typename ::boost::tuples::element<9, Args>::type>
1725 ::call(::boost::tuples::get<9>(args), CALL_ACTUAL_ARGS);
1731 } // namespace lambda
1732 } // namespace boost