File indexing completed on 2025-01-18 09:39:10
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014 #if !defined(BOOST_LAMBDA_EXCEPTIONS_HPP)
0015 #define BOOST_LAMBDA_EXCEPTIONS_HPP
0016
0017 #include "boost/lambda/core.hpp"
0018 #include "boost/lambda/detail/control_constructs_common.hpp"
0019
0020 namespace boost {
0021 namespace lambda {
0022
0023 typedef lambda_functor<placeholder<EXCEPTION> > placeholderE_type;
0024
0025 namespace {
0026 boost::lambda::placeholderE_type freeE;
0027 boost::lambda::placeholderE_type& _e = freeE;
0028 }
0029
0030
0031
0032
0033 template <class Catch1, class Catch2 = null_type, class Catch3 = null_type,
0034 class Catch4 = null_type, class Catch5 = null_type,
0035 class Catch6 = null_type, class Catch7 = null_type,
0036 class Catch8 = null_type, class Catch9 = null_type,
0037 class Catch10 = null_type>
0038 struct catch_action {};
0039
0040 struct catch_all_action {};
0041
0042 template<class CatchActions>
0043 struct return_try_catch_action {};
0044
0045 template<class CatchActions>
0046 struct try_catch_action {};
0047
0048
0049 struct throw_new_action {};
0050 struct rethrow_action {};
0051
0052 template<class ThrowType> struct throw_action;
0053
0054 template<>
0055 struct throw_action<rethrow_action> {
0056 template<class RET>
0057 static RET apply() {
0058 throw;
0059 }
0060 };
0061
0062 template<> struct throw_action<throw_new_action> {
0063 template<class RET, class T>
0064 static RET apply(T& t) {
0065 throw t;
0066 }
0067 };
0068
0069
0070
0071 template<class T, class Any>
0072 struct
0073 return_type_N<throw_action<T>, Any> {
0074 typedef void type;
0075 };
0076
0077
0078
0079
0080
0081
0082
0083
0084
0085
0086
0087
0088
0089
0090 class ifthenelse_action;
0091
0092 namespace detail {
0093
0094
0095
0096
0097
0098
0099
0100
0101
0102
0103
0104
0105
0106
0107
0108
0109 template <class Arg>
0110 struct throws_for_sure_phase2 {
0111 static const bool value = false;
0112 };
0113
0114 template <int N, class ThrowType, class Args>
0115 struct throws_for_sure_phase2<
0116 lambda_functor<
0117 lambda_functor_base<action<N, throw_action<ThrowType> >, Args>
0118 >
0119 >
0120 {
0121 static const bool value = true;
0122 };
0123
0124
0125 template <class Args>
0126 struct throws_for_sure_phase2<
0127 lambda_functor<
0128 lambda_functor_base<
0129 ifthenelse_action, Args
0130 >
0131 >
0132 >
0133 {
0134 static const bool value =
0135 throws_for_sure_phase2<
0136 typename boost::tuples::element<0, Args>::type>::value
0137 ||
0138 (
0139 throws_for_sure_phase2<
0140 typename boost::tuples::element<1, Args>::type
0141 >::value
0142 &&
0143 throws_for_sure_phase2<
0144 typename boost::tuples::element<2, Args>::type
0145 >::value
0146 );
0147 };
0148
0149 template <class Args>
0150 struct throws_for_sure_phase2<
0151 lambda_functor<
0152 lambda_functor_base< other_action<comma_action>, Args>
0153 >
0154 >
0155 {
0156 static const bool value =
0157 throws_for_sure_phase2<
0158 typename boost::tuples::element<0, Args>::type
0159 >::value
0160 ||
0161 throws_for_sure_phase2<
0162 typename boost::tuples::element<1, Args>::type
0163 >::value;
0164 };
0165
0166
0167
0168 template <class Arg>
0169 struct throws_for_sure {
0170 static const bool value
0171 = throws_for_sure_phase2<
0172 typename detail::remove_reference_and_cv<Arg>::type
0173 >::value;
0174 };
0175
0176
0177
0178
0179
0180
0181
0182 template<bool is_conversion>
0183 struct return_or_throw_phase2 {
0184 template<class RET, class Arg, CALL_TEMPLATE_ARGS>
0185 static RET call(Arg& arg, CALL_FORMAL_ARGS) {
0186 BOOST_STATIC_ASSERT(throws_for_sure<Arg>::value);
0187 detail::select(arg, CALL_ACTUAL_ARGS);
0188 throw 1;
0189
0190
0191 }
0192 };
0193
0194
0195 template<>
0196 struct return_or_throw_phase2<true> {
0197 template<class RET, class Arg, CALL_TEMPLATE_ARGS>
0198 static RET call(Arg& arg, CALL_FORMAL_ARGS) {
0199 return detail::select(arg, CALL_ACTUAL_ARGS);
0200 }
0201 };
0202
0203
0204
0205
0206 template<class RET, class ARG>
0207 struct return_or_throw {
0208
0209
0210
0211 template<class Arg, CALL_TEMPLATE_ARGS>
0212 static RET call(Arg& arg, CALL_FORMAL_ARGS)
0213 {
0214
0215 typedef typename as_lambda_functor<ARG>::type lf_type;
0216 typedef typename lf_type::inherited::template
0217 sig<tuple<CALL_REFERENCE_TYPES> >::type RT;
0218
0219 return
0220 return_or_throw_phase2<
0221 ::boost::is_convertible<RT, RET>::value
0222 >::template call<RET>(arg, CALL_ACTUAL_ARGS);
0223 }
0224 };
0225
0226
0227 template<class ARG>
0228 struct return_or_throw<void, ARG> {
0229 template<class Arg, CALL_TEMPLATE_ARGS>
0230 static void call(Arg& arg, CALL_FORMAL_ARGS) { detail::select(arg, CALL_ACTUAL_ARGS); }
0231 };
0232
0233 }
0234
0235
0236
0237 namespace detail {
0238
0239 template <class T> struct catch_block {};
0240 struct catch_all_block {};
0241
0242 template <class T> struct exception_catch_tag {};
0243
0244
0245
0246
0247
0248
0249
0250
0251 }
0252
0253
0254
0255 inline const
0256 lambda_functor<
0257 lambda_functor_base<
0258 action<0, throw_action<rethrow_action> >,
0259 null_type
0260 >
0261 >
0262 rethrow() {
0263 return
0264 lambda_functor_base<
0265 action<0, throw_action<rethrow_action> >,
0266 null_type
0267 >
0268 ( null_type() );
0269 }
0270
0271 template <class Arg1>
0272 inline const
0273 lambda_functor<
0274 lambda_functor_base<
0275 action<1, throw_action<throw_new_action> >,
0276 tuple<typename const_copy_argument<const Arg1>::type>
0277 >
0278 >
0279 throw_exception(const Arg1& a1) {
0280 return
0281 lambda_functor_base<
0282 action<1, throw_action<throw_new_action> >,
0283 tuple<typename const_copy_argument<const Arg1>::type>
0284 >
0285 ( tuple<typename const_copy_argument<const Arg1>::type>(a1));
0286 }
0287
0288
0289 template <class CatchType, class Arg>
0290 inline const
0291 tagged_lambda_functor<
0292 detail::exception_catch_tag<detail::catch_block<CatchType> >,
0293 lambda_functor<Arg>
0294 >
0295 catch_exception(const lambda_functor<Arg>& a) {
0296
0297
0298 return
0299 tagged_lambda_functor<
0300 detail::exception_catch_tag<detail::catch_block<CatchType> >,
0301 lambda_functor<Arg>
0302 > (a);
0303 }
0304
0305
0306 template <class CatchType>
0307 inline const
0308 tagged_lambda_functor<
0309 detail::exception_catch_tag<detail::catch_block<CatchType> >,
0310 lambda_functor<
0311 lambda_functor_base<
0312 do_nothing_action,
0313 null_type
0314 >
0315 >
0316 >
0317 catch_exception() {
0318 return
0319 tagged_lambda_functor<
0320 detail::exception_catch_tag<detail::catch_block<CatchType> >,
0321 lambda_functor<
0322 lambda_functor_base<
0323 do_nothing_action,
0324 null_type
0325 >
0326 >
0327 > ();
0328 }
0329
0330
0331 template <class Arg>
0332 inline const
0333 tagged_lambda_functor<
0334 detail::exception_catch_tag<detail::catch_all_block>,
0335 lambda_functor<Arg>
0336 >
0337 catch_all(const lambda_functor<Arg>& a) {
0338
0339 BOOST_STATIC_ASSERT((!has_placeholder<Arg, THIRD>::value));
0340 return
0341 tagged_lambda_functor<
0342 detail::exception_catch_tag<detail::catch_all_block>,
0343 lambda_functor<Arg>
0344 > (a);
0345 }
0346
0347
0348 inline const
0349 tagged_lambda_functor<
0350 detail::exception_catch_tag<detail::catch_all_block>,
0351 lambda_functor<
0352 lambda_functor_base<
0353 do_nothing_action,
0354 null_type
0355 >
0356 >
0357 >
0358 catch_all() {
0359 return
0360 tagged_lambda_functor<
0361 detail::exception_catch_tag<detail::catch_all_block>,
0362 lambda_functor<
0363 lambda_functor_base<
0364 do_nothing_action,
0365 null_type
0366 >
0367 >
0368 > ();
0369 }
0370
0371
0372
0373 template <class TryArg, class Catch1, class LF1>
0374 inline const
0375 lambda_functor<
0376 lambda_functor_base<
0377 action<2, try_catch_action<catch_action<Catch1> > >,
0378 tuple<lambda_functor<TryArg>, LF1>
0379 >
0380 >
0381 try_catch(
0382 const lambda_functor<TryArg>& a1,
0383 const tagged_lambda_functor<detail::exception_catch_tag<Catch1>, LF1>& a2)
0384 {
0385 return
0386 lambda_functor_base<
0387 action<2, try_catch_action<catch_action<Catch1> > >,
0388 tuple<lambda_functor<TryArg>, LF1>
0389 >
0390 ( tuple< lambda_functor<TryArg>, LF1>(a1, a2));
0391 }
0392
0393 template <class TryArg, class Catch1, class LF1,
0394 class Catch2, class LF2>
0395 inline const
0396 lambda_functor<
0397 lambda_functor_base<
0398 action<3, try_catch_action<catch_action<detail::catch_block<Catch1>, Catch2> > >,
0399 tuple<lambda_functor<TryArg>, LF1, LF2>
0400 >
0401 >
0402 try_catch(
0403 const lambda_functor<TryArg>& a1,
0404 const tagged_lambda_functor<detail::exception_catch_tag<detail::catch_block<Catch1> >, LF1>& a2,
0405 const tagged_lambda_functor<detail::exception_catch_tag<Catch2>, LF2>& a3)
0406 {
0407 return
0408 lambda_functor_base<
0409 action<3, try_catch_action<catch_action<detail::catch_block<Catch1>, Catch2> > >,
0410 tuple<lambda_functor<TryArg>, LF1, LF2>
0411 >
0412 ( tuple<lambda_functor<TryArg>, LF1, LF2>(a1, a2, a3));
0413 }
0414
0415 template <class TryArg, class Catch1, class LF1,
0416 class Catch2, class LF2,
0417 class Catch3, class LF3>
0418 inline const lambda_functor<
0419 lambda_functor_base<
0420 action<4, try_catch_action<catch_action<detail::catch_block<Catch1>, detail::catch_block<Catch2>, Catch3> > >,
0421 tuple<lambda_functor<TryArg>, LF1, LF2, LF3>
0422 >
0423 >
0424 try_catch(
0425 const lambda_functor<TryArg>& a1,
0426 const tagged_lambda_functor<detail::exception_catch_tag<detail::catch_block<Catch1> >, LF1>& a2,
0427 const tagged_lambda_functor<detail::exception_catch_tag<detail::catch_block<Catch2> >, LF2>& a3,
0428 const tagged_lambda_functor<detail::exception_catch_tag<Catch3>, LF3>& a4)
0429 {
0430 return
0431 lambda_functor_base<
0432 action<4, try_catch_action<catch_action<detail::catch_block<Catch1>, detail::catch_block<Catch2>, Catch3> > >,
0433 tuple<lambda_functor<TryArg>, LF1, LF2, LF3>
0434 >
0435 ( tuple<lambda_functor<TryArg>, LF1, LF2, LF3>(a1, a2, a3, a4));
0436 }
0437
0438 template <class TryArg, class Catch1, class LF1,
0439 class Catch2, class LF2,
0440 class Catch3, class LF3,
0441 class Catch4, class LF4>
0442 inline const
0443 lambda_functor<
0444 lambda_functor_base<
0445 action<
0446 5,
0447 try_catch_action<
0448 catch_action<detail::catch_block<Catch1>, detail::catch_block<Catch2>, detail::catch_block<Catch3>, Catch4>
0449 >
0450 >,
0451 tuple<lambda_functor<TryArg>, LF1, LF2, LF3, LF4>
0452 >
0453 >
0454 try_catch(
0455 const lambda_functor<TryArg>& a1,
0456 const tagged_lambda_functor<detail::exception_catch_tag<detail::catch_block<Catch1> >, LF1>& a2,
0457 const tagged_lambda_functor<detail::exception_catch_tag<detail::catch_block<Catch2> >, LF2>& a3,
0458 const tagged_lambda_functor<detail::exception_catch_tag<detail::catch_block<Catch3> >, LF3>& a4,
0459 const tagged_lambda_functor<detail::exception_catch_tag<Catch4>, LF4>& a5)
0460 {
0461 return
0462 lambda_functor_base<
0463 action<
0464 5,
0465 try_catch_action<catch_action<detail::catch_block<Catch1>, detail::catch_block<Catch2>, detail::catch_block<Catch3>, Catch4> >
0466 >,
0467 tuple<lambda_functor<TryArg>, LF1, LF2, LF3, LF4>
0468 >
0469 ( tuple<lambda_functor<TryArg>, LF1, LF2, LF3, LF4>(a1, a2, a3, a4, a5));
0470 }
0471
0472 template <class TryArg, class Catch1, class LF1,
0473 class Catch2, class LF2,
0474 class Catch3, class LF3,
0475 class Catch4, class LF4,
0476 class Catch5, class LF5>
0477 inline const
0478 lambda_functor<
0479 lambda_functor_base<
0480 action<
0481 6,
0482 try_catch_action<catch_action<detail::catch_block<Catch1>, detail::catch_block<Catch2>, detail::catch_block<Catch3>, detail::catch_block<Catch4>, Catch5> >
0483 >,
0484 tuple<lambda_functor<TryArg>, LF1, LF2, LF3, LF4, LF5>
0485 >
0486 >
0487 try_catch(
0488 const lambda_functor<TryArg>& a1,
0489 const tagged_lambda_functor<detail::exception_catch_tag<detail::catch_block<Catch1> >, LF1>& a2,
0490 const tagged_lambda_functor<detail::exception_catch_tag<detail::catch_block<Catch2> >, LF2>& a3,
0491 const tagged_lambda_functor<detail::exception_catch_tag<detail::catch_block<Catch3> >, LF3>& a4,
0492 const tagged_lambda_functor<detail::exception_catch_tag<detail::catch_block<Catch4> >, LF4>& a5,
0493 const tagged_lambda_functor<detail::exception_catch_tag<Catch5>, LF5>& a6)
0494 {
0495 return
0496 lambda_functor_base<
0497 action<
0498 6,
0499 try_catch_action<
0500 catch_action<detail::catch_block<Catch1>, detail::catch_block<Catch2>, detail::catch_block<Catch3>, detail::catch_block<Catch4>, Catch5>
0501 >
0502 >,
0503 tuple<lambda_functor<TryArg>, LF1, LF2, LF3, LF4, LF5>
0504 >
0505 ( tuple<lambda_functor<TryArg>, LF1, LF2, LF3, LF4, LF5>
0506 (a1, a2, a3, a4, a5, a6)
0507 );
0508 }
0509
0510 template <class TryArg, class Catch1, class LF1,
0511 class Catch2, class LF2,
0512 class Catch3, class LF3,
0513 class Catch4, class LF4,
0514 class Catch5, class LF5,
0515 class Catch6, class LF6>
0516 inline const
0517 lambda_functor<
0518 lambda_functor_base<
0519 action<
0520 7,
0521 try_catch_action<
0522 catch_action<detail::catch_block<Catch1>, detail::catch_block<Catch2>, detail::catch_block<Catch3>, detail::catch_block<Catch4>, detail::catch_block<Catch5>, Catch6>
0523 >
0524 >,
0525 tuple<lambda_functor<TryArg>, LF1, LF2, LF3, LF4, LF5, LF6>
0526 >
0527 >
0528 try_catch(
0529 const lambda_functor<TryArg>& a1,
0530 const tagged_lambda_functor<detail::exception_catch_tag<detail::catch_block<Catch1> >, LF1>& a2,
0531 const tagged_lambda_functor<detail::exception_catch_tag<detail::catch_block<Catch2> >, LF2>& a3,
0532 const tagged_lambda_functor<detail::exception_catch_tag<detail::catch_block<Catch3> >, LF3>& a4,
0533 const tagged_lambda_functor<detail::exception_catch_tag<detail::catch_block<Catch4> >, LF4>& a5,
0534 const tagged_lambda_functor<detail::exception_catch_tag<detail::catch_block<Catch5> >, LF5>& a6,
0535 const tagged_lambda_functor<detail::exception_catch_tag<Catch6>, LF6>& a7)
0536 {
0537 return
0538 lambda_functor_base<
0539 action<
0540 7,
0541 try_catch_action<
0542 catch_action<detail::catch_block<Catch1>, detail::catch_block<Catch2>, detail::catch_block<Catch3>, detail::catch_block<Catch4>, detail::catch_block<Catch5>,Catch6>
0543 >
0544 >,
0545 tuple<lambda_functor<TryArg>, LF1, LF2, LF3, LF4, LF5, LF6>
0546 >
0547 ( tuple<lambda_functor<TryArg>, LF1, LF2, LF3, LF4, LF5, LF6>
0548 (a1, a2, a3, a4, a5, a6, a7));
0549 }
0550
0551 template <class TryArg, class Catch1, class LF1,
0552 class Catch2, class LF2,
0553 class Catch3, class LF3,
0554 class Catch4, class LF4,
0555 class Catch5, class LF5,
0556 class Catch6, class LF6,
0557 class Catch7, class LF7>
0558 inline const
0559 lambda_functor<
0560 lambda_functor_base<
0561 action<
0562 8,
0563 try_catch_action<
0564 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>
0565 >
0566 >,
0567 tuple<lambda_functor<TryArg>, LF1, LF2, LF3, LF4, LF5, LF6, LF7>
0568 >
0569 >
0570 try_catch(
0571 const lambda_functor<TryArg>& a1,
0572 const tagged_lambda_functor<detail::exception_catch_tag<detail::catch_block<Catch1> >, LF1>& a2,
0573 const tagged_lambda_functor<detail::exception_catch_tag<detail::catch_block<Catch2> >, LF2>& a3,
0574 const tagged_lambda_functor<detail::exception_catch_tag<detail::catch_block<Catch3> >, LF3>& a4,
0575 const tagged_lambda_functor<detail::exception_catch_tag<detail::catch_block<Catch4> >, LF4>& a5,
0576 const tagged_lambda_functor<detail::exception_catch_tag<detail::catch_block<Catch5> >, LF5>& a6,
0577 const tagged_lambda_functor<detail::exception_catch_tag<detail::catch_block<Catch6> >, LF6>& a7,
0578 const tagged_lambda_functor<detail::exception_catch_tag<Catch7>, LF7>& a8)
0579 {
0580 return
0581 lambda_functor_base<
0582 action<
0583 8,
0584 try_catch_action<
0585 catch_action<
0586 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
0587 >
0588 >
0589 >,
0590 tuple<lambda_functor<TryArg>, LF1, LF2, LF3, LF4, LF5, LF6, LF7>
0591 >
0592 ( tuple<lambda_functor<TryArg>, LF1, LF2, LF3, LF4, LF5, LF6, LF7>
0593 (a1, a2, a3, a4, a5, a6, a7, a8));
0594 }
0595
0596 template <class TryArg, class Catch1, class LF1,
0597 class Catch2, class LF2,
0598 class Catch3, class LF3,
0599 class Catch4, class LF4,
0600 class Catch5, class LF5,
0601 class Catch6, class LF6,
0602 class Catch7, class LF7,
0603 class Catch8, class LF8>
0604 inline const
0605 lambda_functor<
0606 lambda_functor_base<
0607 action<
0608 9,
0609 try_catch_action<
0610 catch_action<
0611 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
0612 >
0613 >
0614 >,
0615 tuple<lambda_functor<TryArg>, LF1, LF2, LF3, LF4, LF5, LF6, LF7, LF8>
0616 >
0617 >
0618 try_catch(
0619 const lambda_functor<TryArg>& a1,
0620 const tagged_lambda_functor<detail::exception_catch_tag<detail::catch_block<Catch1> >, LF1>& a2,
0621 const tagged_lambda_functor<detail::exception_catch_tag<detail::catch_block<Catch2> >, LF2>& a3,
0622 const tagged_lambda_functor<detail::exception_catch_tag<detail::catch_block<Catch3> >, LF3>& a4,
0623 const tagged_lambda_functor<detail::exception_catch_tag<detail::catch_block<Catch4> >, LF4>& a5,
0624 const tagged_lambda_functor<detail::exception_catch_tag<detail::catch_block<Catch5> >, LF5>& a6,
0625 const tagged_lambda_functor<detail::exception_catch_tag<detail::catch_block<Catch6> >, LF6>& a7,
0626 const tagged_lambda_functor<detail::exception_catch_tag<detail::catch_block<Catch7> >, LF7>& a8,
0627 const tagged_lambda_functor<detail::exception_catch_tag<Catch8>, LF8>& a9)
0628 {
0629 return
0630 lambda_functor_base<
0631 action<
0632 9,
0633 try_catch_action<
0634 catch_action<
0635 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
0636 >
0637 >
0638 >,
0639 tuple<lambda_functor<TryArg>, LF1, LF2, LF3, LF4, LF5, LF6, LF7, LF8>
0640 >
0641 ( tuple<lambda_functor<TryArg>, LF1, LF2, LF3, LF4, LF5, LF6, LF7, LF8>
0642 (a1, a2, a3, a4, a5, a6, a7, a8, a9));
0643 }
0644
0645 template <class TryArg, class Catch1, class LF1,
0646 class Catch2, class LF2,
0647 class Catch3, class LF3,
0648 class Catch4, class LF4,
0649 class Catch5, class LF5,
0650 class Catch6, class LF6,
0651 class Catch7, class LF7,
0652 class Catch8, class LF8,
0653 class Catch9, class LF9>
0654 inline const
0655 lambda_functor<
0656 lambda_functor_base<
0657 action<
0658 10,
0659 try_catch_action<
0660 catch_action<
0661 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>,
0662 Catch9
0663 >
0664 >
0665 >,
0666 tuple<
0667 lambda_functor<TryArg>, LF1, LF2, LF3, LF4, LF5, LF6, LF7, LF8, LF9
0668 >
0669 >
0670 >
0671 try_catch(
0672 const lambda_functor<TryArg>& a1,
0673 const tagged_lambda_functor<detail::exception_catch_tag<detail::catch_block<Catch1> >, LF1>& a2,
0674 const tagged_lambda_functor<detail::exception_catch_tag<detail::catch_block<Catch2> >, LF2>& a3,
0675 const tagged_lambda_functor<detail::exception_catch_tag<detail::catch_block<Catch3> >, LF3>& a4,
0676 const tagged_lambda_functor<detail::exception_catch_tag<detail::catch_block<Catch4> >, LF4>& a5,
0677 const tagged_lambda_functor<detail::exception_catch_tag<detail::catch_block<Catch5> >, LF5>& a6,
0678 const tagged_lambda_functor<detail::exception_catch_tag<detail::catch_block<Catch6> >, LF6>& a7,
0679 const tagged_lambda_functor<detail::exception_catch_tag<detail::catch_block<Catch7> >, LF7>& a8,
0680 const tagged_lambda_functor<detail::exception_catch_tag<detail::catch_block<Catch8> >, LF8>& a9,
0681 const tagged_lambda_functor<detail::exception_catch_tag<Catch9>, LF9>& a10)
0682 {
0683 return
0684 lambda_functor_base<
0685 action<
0686 10,
0687 try_catch_action<
0688 catch_action<
0689 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>,
0690 Catch9
0691 >
0692 >
0693 >,
0694 tuple<
0695 lambda_functor<TryArg>, LF1, LF2, LF3, LF4, LF5, LF6, LF7, LF8, LF9
0696 >
0697 >
0698 ( tuple<
0699 lambda_functor<TryArg>, LF1, LF2, LF3, LF4, LF5, LF6, LF7, LF8, LF9
0700 >(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10));
0701 }
0702
0703
0704
0705
0706
0707
0708
0709 template<class Args, class Catch1>
0710 class lambda_functor_base<
0711 action<2, try_catch_action<catch_action<detail::catch_block<Catch1> > > >,
0712 Args
0713 >
0714 {
0715 public:
0716 Args args;
0717 public:
0718 explicit lambda_functor_base(const Args& a) : args(a) {}
0719
0720
0721
0722
0723
0724 template <class SigArgs> struct sig {
0725 typedef typename
0726 as_lambda_functor<
0727 typename boost::tuples::element<0, Args>::type
0728 >::type lf_type;
0729
0730 typedef typename lf_type::inherited::template sig<SigArgs>::type type;
0731 };
0732
0733 template<class RET, CALL_TEMPLATE_ARGS>
0734 RET call(CALL_FORMAL_ARGS) const {
0735 try
0736 {
0737 return detail::select(::boost::tuples::get<0>(args), CALL_ACTUAL_ARGS);
0738 }
0739 catch (Catch1& e)
0740 {
0741 return
0742 detail::return_or_throw<RET, typename ::boost::tuples::element<1, Args>::type>
0743 ::call(::boost::tuples::get<1>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
0744 }
0745 }
0746 };
0747
0748
0749
0750 template<class Args>
0751 class lambda_functor_base<action<2, try_catch_action<catch_action<detail::catch_all_block> > >, Args> {
0752 public:
0753 Args args;
0754 public:
0755 explicit lambda_functor_base(const Args& a) : args(a) {}
0756
0757 template <class SigArgs> struct sig {
0758 typedef typename
0759 as_lambda_functor<
0760 typename boost::tuples::element<0, Args>::type
0761 >::type lf_type;
0762
0763 typedef typename lf_type::inherited::template sig<SigArgs>::type type;
0764 };
0765
0766 template<class RET, CALL_TEMPLATE_ARGS>
0767 RET call(CALL_FORMAL_ARGS) const {
0768 try
0769 {
0770 return detail::select(::boost::tuples::get<0>(args), CALL_ACTUAL_ARGS);
0771 }
0772 catch (...)
0773 {
0774 return
0775 detail::return_or_throw<RET, typename ::boost::tuples::element<1, Args>::type>
0776 ::call(::boost::tuples::get<1>(args), CALL_ACTUAL_ARGS);
0777 }
0778 }
0779 };
0780
0781
0782
0783 template<class Args, class Catch1, class Catch2>
0784 class lambda_functor_base<action<3, try_catch_action<catch_action<detail::catch_block<Catch1>, detail::catch_block<Catch2> > > >, Args> {
0785 public:
0786 Args args;
0787 public:
0788 explicit lambda_functor_base(const Args& a) : args(a) {}
0789
0790 template <class SigArgs> struct sig {
0791 typedef typename
0792 as_lambda_functor<
0793 typename boost::tuples::element<0, Args>::type
0794 >::type lf_type;
0795
0796 typedef typename lf_type::inherited::template sig<SigArgs>::type type;
0797 };
0798
0799 template<class RET, CALL_TEMPLATE_ARGS>
0800 RET call(CALL_FORMAL_ARGS) const {
0801 try
0802 {
0803 return detail::select(::boost::tuples::get<0>(args), CALL_ACTUAL_ARGS);
0804 }
0805 catch (Catch1& e)
0806 {
0807 return
0808 detail::return_or_throw<RET, typename ::boost::tuples::element<1, Args>::type>
0809 ::call(::boost::tuples::get<1>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
0810 }
0811 catch (Catch2& e)
0812 {
0813 return
0814 detail::return_or_throw<RET, typename ::boost::tuples::element<2, Args>::type>
0815 ::call(::boost::tuples::get<2>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
0816 }
0817 }
0818 };
0819
0820 template<class Args, class Catch1>
0821 class lambda_functor_base<action<3, try_catch_action<catch_action<detail::catch_block<Catch1>,detail::catch_all_block> > >, Args> {
0822 public:
0823 Args args;
0824 public:
0825 explicit lambda_functor_base(const Args& a) : args(a) {}
0826
0827 template <class SigArgs> struct sig {
0828 typedef typename
0829 as_lambda_functor<
0830 typename boost::tuples::element<0, Args>::type
0831 >::type lf_type;
0832
0833 typedef typename lf_type::inherited::template sig<SigArgs>::type type;
0834 };
0835
0836 template<class RET, CALL_TEMPLATE_ARGS>
0837 RET call(CALL_FORMAL_ARGS) const {
0838 try
0839 {
0840 return detail::select(::boost::tuples::get<0>(args), CALL_ACTUAL_ARGS);
0841 }
0842 catch (Catch1& e)
0843 {
0844 return
0845 detail::return_or_throw<RET, typename ::boost::tuples::element<1, Args>::type>
0846 ::call(::boost::tuples::get<1>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
0847 }
0848 catch (...)
0849 {
0850 return
0851 detail::return_or_throw<RET, typename ::boost::tuples::element<2, Args>::type>
0852 ::call(::boost::tuples::get<2>(args), CALL_ACTUAL_ARGS);
0853 }
0854 }
0855 };
0856
0857
0858 template<class Args, class Catch1, class Catch2, class Catch3>
0859 class lambda_functor_base<action<4, try_catch_action<catch_action<detail::catch_block<Catch1>, detail::catch_block<Catch2>, detail::catch_block<Catch3> > > >, Args> {
0860 public:
0861 Args args;
0862 public:
0863 explicit lambda_functor_base(const Args& a) : args(a) {}
0864
0865 template <class SigArgs> struct sig {
0866 typedef typename
0867 as_lambda_functor<
0868 typename boost::tuples::element<0, Args>::type
0869 >::type lf_type;
0870
0871 typedef typename lf_type::inherited::template sig<SigArgs>::type type;
0872 };
0873
0874 template<class RET, CALL_TEMPLATE_ARGS>
0875 RET call(CALL_FORMAL_ARGS) const {
0876 try
0877 {
0878 return detail::select(::boost::tuples::get<0>(args), CALL_ACTUAL_ARGS);
0879 }
0880 catch (Catch1& e)
0881 {
0882 return
0883 detail::return_or_throw<RET, typename ::boost::tuples::element<1, Args>::type>
0884 ::call(::boost::tuples::get<1>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
0885
0886 }
0887 catch (Catch2& e)
0888 {
0889 return
0890 detail::return_or_throw<RET, typename ::boost::tuples::element<2, Args>::type>
0891 ::call(::boost::tuples::get<2>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
0892
0893 }
0894 catch (Catch3& e)
0895 {
0896 return
0897 detail::return_or_throw<RET, typename ::boost::tuples::element<3, Args>::type>
0898 ::call(::boost::tuples::get<3>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
0899 }
0900 }
0901 };
0902
0903 template<class Args, class Catch1, class Catch2>
0904 class lambda_functor_base<action<4, try_catch_action<catch_action<detail::catch_block<Catch1>, detail::catch_block<Catch2>,detail::catch_all_block> > >, Args> {
0905 public:
0906 Args args;
0907 public:
0908 explicit lambda_functor_base(const Args& a) : args(a) {}
0909
0910 template <class SigArgs> struct sig {
0911 typedef typename
0912 as_lambda_functor<
0913 typename boost::tuples::element<0, Args>::type
0914 >::type lf_type;
0915
0916 typedef typename lf_type::inherited::template sig<SigArgs>::type type;
0917 };
0918
0919 template<class RET, CALL_TEMPLATE_ARGS>
0920 RET call(CALL_FORMAL_ARGS) const {
0921 try
0922 {
0923 return detail::select(::boost::tuples::get<0>(args), CALL_ACTUAL_ARGS);
0924 }
0925 catch (Catch1& e)
0926 {
0927 return
0928 detail::return_or_throw<RET, typename ::boost::tuples::element<1, Args>::type>
0929 ::call(::boost::tuples::get<1>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
0930 }
0931 catch (Catch2& e)
0932 {
0933 return
0934 detail::return_or_throw<RET, typename ::boost::tuples::element<2, Args>::type>
0935 ::call(::boost::tuples::get<2>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
0936 }
0937 catch (...)
0938 {
0939 return
0940 detail::return_or_throw<RET, typename ::boost::tuples::element<3, Args>::type>
0941 ::call(::boost::tuples::get<3>(args), CALL_ACTUAL_ARGS);
0942 }
0943 }
0944 };
0945
0946
0947 template<class Args, class Catch1, class Catch2, class Catch3, class Catch4>
0948 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> {
0949 public:
0950 Args args;
0951 public:
0952 explicit lambda_functor_base(const Args& a) : args(a) {}
0953
0954 template <class SigArgs> struct sig {
0955 typedef typename
0956 as_lambda_functor<
0957 typename boost::tuples::element<0, Args>::type
0958 >::type lf_type;
0959
0960 typedef typename lf_type::inherited::template sig<SigArgs>::type type;
0961 };
0962
0963 template<class RET, CALL_TEMPLATE_ARGS>
0964 RET call(CALL_FORMAL_ARGS) const {
0965 try
0966 {
0967 return detail::select(::boost::tuples::get<0>(args), CALL_ACTUAL_ARGS);
0968 }
0969 catch (Catch1& e)
0970 {
0971 return
0972 detail::return_or_throw<RET, typename ::boost::tuples::element<1, Args>::type>
0973 ::call(::boost::tuples::get<1>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
0974 }
0975 catch (Catch2& e)
0976 {
0977 return
0978 detail::return_or_throw<RET, typename ::boost::tuples::element<2, Args>::type>
0979 ::call(::boost::tuples::get<2>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
0980 }
0981 catch (Catch3& e)
0982 {
0983 return
0984 detail::return_or_throw<RET, typename ::boost::tuples::element<3, Args>::type>
0985 ::call(::boost::tuples::get<3>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
0986 }
0987 catch (Catch4& e)
0988 {
0989 return
0990 detail::return_or_throw<RET, typename ::boost::tuples::element<4, Args>::type>
0991 ::call(::boost::tuples::get<4>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
0992 }
0993 }
0994 };
0995
0996 template<class Args, class Catch1, class Catch2, class Catch3>
0997 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> {
0998 public:
0999 Args args;
1000 public:
1001 explicit lambda_functor_base(const Args& a) : args(a) {}
1002
1003 template <class SigArgs> struct sig {
1004 typedef typename
1005 as_lambda_functor<
1006 typename boost::tuples::element<0, Args>::type
1007 >::type lf_type;
1008
1009 typedef typename lf_type::inherited::template sig<SigArgs>::type type;
1010 };
1011
1012 template<class RET, CALL_TEMPLATE_ARGS>
1013 RET call(CALL_FORMAL_ARGS) const {
1014 try
1015 {
1016 return detail::select(::boost::tuples::get<0>(args), CALL_ACTUAL_ARGS);
1017 }
1018 catch (Catch1& e)
1019 {
1020 return
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);
1023 }
1024 catch (Catch2& e)
1025 {
1026 return
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);
1029 }
1030 catch (Catch3& e)
1031 {
1032 return
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);
1035 }
1036 catch (...)
1037 {
1038 return
1039 detail::return_or_throw<RET, typename ::boost::tuples::element<4, Args>::type>
1040 ::call(::boost::tuples::get<4>(args), CALL_ACTUAL_ARGS);
1041 }
1042 }
1043 };
1044
1045
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> {
1048 public:
1049 Args args;
1050 public:
1051 explicit lambda_functor_base(const Args& a) : args(a) {}
1052
1053 template <class SigArgs> struct sig {
1054 typedef typename
1055 as_lambda_functor<
1056 typename boost::tuples::element<0, Args>::type
1057 >::type lf_type;
1058
1059 typedef typename lf_type::inherited::template sig<SigArgs>::type type;
1060 };
1061
1062 template<class RET, CALL_TEMPLATE_ARGS>
1063 RET call(CALL_FORMAL_ARGS) const {
1064 try
1065 {
1066 return detail::select(::boost::tuples::get<0>(args), CALL_ACTUAL_ARGS);
1067 }
1068 catch (Catch1& e)
1069 {
1070 return
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);
1073 }
1074 catch (Catch2& e)
1075 {
1076 return
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);
1079 }
1080 catch (Catch3& e)
1081 {
1082 return
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);
1085 }
1086 catch (Catch4& e)
1087 {
1088 return
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);
1091 }
1092 catch (Catch5& e)
1093 {
1094 return
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);
1097 }
1098 }
1099 };
1100
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> {
1103 public:
1104 Args args;
1105 public:
1106 explicit lambda_functor_base(const Args& a) : args(a) {}
1107
1108 template <class SigArgs> struct sig {
1109 typedef typename
1110 as_lambda_functor<
1111 typename boost::tuples::element<0, Args>::type
1112 >::type lf_type;
1113
1114 typedef typename lf_type::inherited::template sig<SigArgs>::type type;
1115 };
1116
1117 template<class RET, CALL_TEMPLATE_ARGS>
1118 RET call(CALL_FORMAL_ARGS) const {
1119 try
1120 {
1121 return detail::select(::boost::tuples::get<0>(args), CALL_ACTUAL_ARGS);
1122 }
1123 catch (Catch1& e)
1124 {
1125 return
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);
1128 }
1129 catch (Catch2& e)
1130 {
1131 return
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);
1134 }
1135 catch (Catch3& e)
1136 {
1137 return
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);
1140 }
1141 catch (Catch4& e)
1142 {
1143 return
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);
1146 }
1147 catch (...)
1148 {
1149 return
1150 detail::return_or_throw<RET, typename ::boost::tuples::element<5, Args>::type>
1151 ::call(::boost::tuples::get<5>(args), CALL_ACTUAL_ARGS);
1152 }
1153 }
1154 };
1155
1156
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> {
1159 public:
1160 Args args;
1161 public:
1162 explicit lambda_functor_base(const Args& a) : args(a) {}
1163
1164 template <class SigArgs> struct sig {
1165 typedef typename
1166 as_lambda_functor<
1167 typename boost::tuples::element<0, Args>::type
1168 >::type lf_type;
1169
1170 typedef typename lf_type::inherited::template sig<SigArgs>::type type;
1171 };
1172
1173 template<class RET, CALL_TEMPLATE_ARGS>
1174 RET call(CALL_FORMAL_ARGS) const {
1175 try
1176 {
1177 return detail::select(::boost::tuples::get<0>(args), CALL_ACTUAL_ARGS);
1178 }
1179 catch (Catch1& e)
1180 {
1181 return
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);
1184 }
1185 catch (Catch2& e)
1186 {
1187 return
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);
1190 }
1191 catch (Catch3& e)
1192 {
1193 return
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);
1196 }
1197 catch (Catch4& e)
1198 {
1199 return
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);
1202 }
1203 catch (Catch5& e)
1204 {
1205 return
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);
1208 }
1209 catch (Catch6& e)
1210 {
1211 return
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);
1214 }
1215 }
1216 };
1217
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> {
1220 public:
1221 Args args;
1222 public:
1223 explicit lambda_functor_base(const Args& a) : args(a) {}
1224
1225 template <class SigArgs> struct sig {
1226 typedef typename
1227 as_lambda_functor<
1228 typename boost::tuples::element<0, Args>::type
1229 >::type lf_type;
1230
1231 typedef typename lf_type::inherited::template sig<SigArgs>::type type;
1232 };
1233
1234 template<class RET, CALL_TEMPLATE_ARGS>
1235 RET call(CALL_FORMAL_ARGS) const {
1236 try
1237 {
1238 return detail::select(::boost::tuples::get<0>(args), CALL_ACTUAL_ARGS);
1239 }
1240 catch (Catch1& e)
1241 {
1242 return
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);
1245 }
1246 catch (Catch2& e)
1247 {
1248 return
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);
1251 }
1252 catch (Catch3& e)
1253 {
1254 return
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);
1257 }
1258 catch (Catch4& e)
1259 {
1260 return
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);
1263 }
1264 catch (Catch5& e)
1265 {
1266 return
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);
1269 }
1270 catch (...)
1271 {
1272 return
1273 detail::return_or_throw<RET, typename ::boost::tuples::element<6, Args>::type>
1274 ::call(::boost::tuples::get<6>(args), CALL_ACTUAL_ARGS);
1275 }
1276 }
1277 };
1278
1279
1280 template<class Args, class Catch1, class Catch2, class Catch3, class Catch4, class Catch5, class Catch6,
1281 class Catch7>
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> {
1283 public:
1284 Args args;
1285 public:
1286 explicit lambda_functor_base(const Args& a) : args(a) {}
1287
1288 template <class SigArgs> struct sig {
1289 typedef typename
1290 as_lambda_functor<
1291 typename boost::tuples::element<0, Args>::type
1292 >::type lf_type;
1293
1294 typedef typename lf_type::inherited::template sig<SigArgs>::type type;
1295 };
1296
1297 template<class RET, CALL_TEMPLATE_ARGS>
1298 RET call(CALL_FORMAL_ARGS) const {
1299 try
1300 {
1301 return detail::select(::boost::tuples::get<0>(args), CALL_ACTUAL_ARGS);
1302 }
1303 catch (Catch1& e)
1304 {
1305 return
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);
1308 }
1309 catch (Catch2& e)
1310 {
1311 return
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);
1314 }
1315 catch (Catch3& e)
1316 {
1317 return
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);
1320 }
1321 catch (Catch4& e)
1322 {
1323 return
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);
1326 }
1327 catch (Catch5& e)
1328 {
1329 return
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);
1332 }
1333 catch (Catch6& e)
1334 {
1335 return
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);
1338 }
1339 catch (Catch7& e)
1340 {
1341 return
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);
1344 }
1345 }
1346 };
1347
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> {
1351 public:
1352 Args args;
1353 public:
1354 explicit lambda_functor_base(const Args& a) : args(a) {}
1355
1356 template <class SigArgs> struct sig {
1357 typedef typename
1358 as_lambda_functor<
1359 typename boost::tuples::element<0, Args>::type
1360 >::type lf_type;
1361
1362 typedef typename lf_type::inherited::template sig<SigArgs>::type type;
1363 };
1364
1365 template<class RET, CALL_TEMPLATE_ARGS>
1366 RET call(CALL_FORMAL_ARGS) const {
1367 try
1368 {
1369 return detail::select(::boost::tuples::get<0>(args), CALL_ACTUAL_ARGS);
1370 }
1371 catch (Catch1& e)
1372 {
1373 return
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);
1376 }
1377 catch (Catch2& e)
1378 {
1379 return
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);
1382 }
1383 catch (Catch3& e)
1384 {
1385 return
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);
1388 }
1389 catch (Catch4& e)
1390 {
1391 return
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);
1394 }
1395 catch (Catch5& e)
1396 {
1397 return
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);
1400 }
1401 catch (Catch6& e)
1402 {
1403 return
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);
1406 }
1407 catch (...)
1408 {
1409 return
1410 detail::return_or_throw<RET, typename ::boost::tuples::element<7, Args>::type>
1411 ::call(::boost::tuples::get<7>(args), CALL_ACTUAL_ARGS);
1412 }
1413 }
1414 };
1415
1416
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> {
1421 public:
1422 Args args;
1423 public:
1424 explicit lambda_functor_base(const Args& a) : args(a) {}
1425
1426 template <class SigArgs> struct sig {
1427 typedef typename
1428 as_lambda_functor<
1429 typename boost::tuples::element<0, Args>::type
1430 >::type lf_type;
1431
1432 typedef typename lf_type::inherited::template sig<SigArgs>::type type;
1433 };
1434
1435 template<class RET, CALL_TEMPLATE_ARGS>
1436 RET call(CALL_FORMAL_ARGS) const {
1437 try
1438 {
1439 return detail::select(::boost::tuples::get<0>(args), CALL_ACTUAL_ARGS);
1440 }
1441 catch (Catch1& e)
1442 {
1443 return
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);
1446 }
1447 catch (Catch2& e)
1448 {
1449 return
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);
1452 }
1453 catch (Catch3& e)
1454 {
1455 return
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);
1458 }
1459 catch (Catch4& e)
1460 {
1461 return
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);
1464 }
1465 catch (Catch5& e)
1466 {
1467 return
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);
1470 }
1471 catch (Catch6& e)
1472 {
1473 return
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);
1476 }
1477 catch (Catch7& e)
1478 {
1479 return
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);
1482 }
1483 catch (Catch8& e)
1484 {
1485 return
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);
1488 }
1489 }
1490 };
1491
1492 template<class Args, class Catch1, class Catch2, class Catch3, class Catch4, class Catch5, class Catch6,
1493 class Catch7>
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> {
1496 public:
1497 Args args;
1498 public:
1499 explicit lambda_functor_base(const Args& a) : args(a) {}
1500
1501 template <class SigArgs> struct sig {
1502 typedef typename
1503 as_lambda_functor<
1504 typename boost::tuples::element<0, Args>::type
1505 >::type lf_type;
1506
1507 typedef typename lf_type::inherited::template sig<SigArgs>::type type;
1508 };
1509
1510 template<class RET, CALL_TEMPLATE_ARGS>
1511 RET call(CALL_FORMAL_ARGS) const {
1512 try
1513 {
1514 return detail::select(::boost::tuples::get<0>(args), CALL_ACTUAL_ARGS);
1515 }
1516 catch (Catch1& e)
1517 {
1518 return
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);
1521 }
1522 catch (Catch2& e)
1523 {
1524 return
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);
1527 }
1528 catch (Catch3& e)
1529 {
1530 return
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);
1533 }
1534 catch (Catch4& e)
1535 {
1536 return
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);
1539 }
1540 catch (Catch5& e)
1541 {
1542 return
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);
1545 }
1546 catch (Catch6& e)
1547 {
1548 return
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);
1551 }
1552 catch (Catch7& e)
1553 {
1554 return
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);
1557 }
1558 catch (...)
1559 {
1560 return
1561 detail::return_or_throw<RET, typename ::boost::tuples::element<8, Args>::type>
1562 ::call(::boost::tuples::get<8>(args), CALL_ACTUAL_ARGS);
1563 }
1564 }
1565 };
1566
1567
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> {
1572 public:
1573 Args args;
1574 public:
1575 explicit lambda_functor_base(const Args& a) : args(a) {}
1576
1577 template <class SigArgs> struct sig {
1578 typedef typename
1579 as_lambda_functor<
1580 typename boost::tuples::element<0, Args>::type
1581 >::type lf_type;
1582
1583 typedef typename lf_type::inherited::template sig<SigArgs>::type type;
1584 };
1585
1586 template<class RET, CALL_TEMPLATE_ARGS>
1587 RET call(CALL_FORMAL_ARGS) const {
1588 try
1589 {
1590 return detail::select(::boost::tuples::get<0>(args), CALL_ACTUAL_ARGS);
1591 }
1592 catch (Catch1& e)
1593 {
1594 return
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);
1597 }
1598 catch (Catch2& e)
1599 {
1600 return
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);
1603 }
1604 catch (Catch3& e)
1605 {
1606 return
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);
1609 }
1610 catch (Catch4& e)
1611 {
1612 return
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);
1615 }
1616 catch (Catch5& e)
1617 {
1618 return
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);
1621 }
1622 catch (Catch6& e)
1623 {
1624 return
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);
1627 }
1628 catch (Catch7& e)
1629 {
1630 return
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);
1633 }
1634 catch (Catch8& e)
1635 {
1636 return
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);
1639 }
1640 catch (Catch9& e)
1641 {
1642 return
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);
1645 }
1646 }
1647 };
1648
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> {
1653 public:
1654 Args args;
1655 public:
1656 explicit lambda_functor_base(const Args& a) : args(a) {}
1657
1658 template <class SigArgs> struct sig {
1659 typedef typename
1660 as_lambda_functor<
1661 typename boost::tuples::element<0, Args>::type
1662 >::type lf_type;
1663
1664 typedef typename lf_type::inherited::template sig<SigArgs>::type type;
1665 };
1666
1667 template<class RET, CALL_TEMPLATE_ARGS>
1668 RET call(CALL_FORMAL_ARGS) const {
1669 try
1670 {
1671 return detail::select(::boost::tuples::get<0>(args), CALL_ACTUAL_ARGS);
1672 }
1673 catch (Catch1& e)
1674 {
1675 return
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);
1678 }
1679 catch (Catch2& e)
1680 {
1681 return
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);
1684 }
1685 catch (Catch3& e)
1686 {
1687 return
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);
1690 }
1691 catch (Catch4& e)
1692 {
1693 return
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);
1696 }
1697 catch (Catch5& e)
1698 {
1699 return
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);
1702 }
1703 catch (Catch6& e)
1704 {
1705 return
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);
1708 }
1709 catch (Catch7& e)
1710 {
1711 return
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);
1714 }
1715 catch (Catch8& e)
1716 {
1717 return
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);
1720 }
1721 catch (...)
1722 {
1723 return
1724 detail::return_or_throw<RET, typename ::boost::tuples::element<9, Args>::type>
1725 ::call(::boost::tuples::get<9>(args), CALL_ACTUAL_ARGS);
1726 }
1727 }
1728 };
1729
1730
1731 }
1732 }
1733
1734
1735 #endif
1736
1737
1738
1739
1740
1741