exceptions.hpp
来自「support vector clustering for vc++」· HPP 代码 · 共 1,741 行 · 第 1/5 页
HPP
1,741 行
detail::return_or_throw<RET, typename ::boost::tuples::element<5, Args>::type>
::call(::boost::tuples::get<5>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
}
catch (Catch6& e)
{
return
detail::return_or_throw<RET, typename ::boost::tuples::element<6, Args>::type>
::call(::boost::tuples::get<6>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
}
catch (...)
{
return
detail::return_or_throw<RET, typename ::boost::tuples::element<7, Args>::type>
::call(::boost::tuples::get<7>(args), CALL_ACTUAL_ARGS);
}
}
};
// 8 catch types case
template<class Args, class Catch1, class Catch2, class Catch3, class Catch4, class Catch5, class Catch6,
class Catch7, class Catch8>
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>,
detail::catch_block<Catch7>, detail::catch_block<Catch8> > > >, Args> {
public:
Args args;
public:
explicit lambda_functor_base(const Args& a) : args(a) {}
template <class SigArgs> struct sig {
typedef typename
as_lambda_functor<
typename boost::tuples::element<0, Args>::type
>::type lf_type;
typedef typename lf_type::inherited::template sig<SigArgs>::type type;
};
template<class RET, CALL_TEMPLATE_ARGS>
RET call(CALL_FORMAL_ARGS) const {
try
{
return detail::select(::boost::tuples::get<0>(args), CALL_ACTUAL_ARGS);
}
catch (Catch1& e)
{
return
detail::return_or_throw<RET, typename ::boost::tuples::element<1, Args>::type>
::call(::boost::tuples::get<1>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
}
catch (Catch2& e)
{
return
detail::return_or_throw<RET, typename ::boost::tuples::element<2, Args>::type>
::call(::boost::tuples::get<2>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
}
catch (Catch3& e)
{
return
detail::return_or_throw<RET, typename ::boost::tuples::element<3, Args>::type>
::call(::boost::tuples::get<3>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
}
catch (Catch4& e)
{
return
detail::return_or_throw<RET, typename ::boost::tuples::element<4, Args>::type>
::call(::boost::tuples::get<4>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
}
catch (Catch5& e)
{
return
detail::return_or_throw<RET, typename ::boost::tuples::element<5, Args>::type>
::call(::boost::tuples::get<5>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
}
catch (Catch6& e)
{
return
detail::return_or_throw<RET, typename ::boost::tuples::element<6, Args>::type>
::call(::boost::tuples::get<6>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
}
catch (Catch7& e)
{
return
detail::return_or_throw<RET, typename ::boost::tuples::element<7, Args>::type>
::call(::boost::tuples::get<7>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
}
catch (Catch8& e)
{
return
detail::return_or_throw<RET, typename ::boost::tuples::element<8, Args>::type>
::call(::boost::tuples::get<8>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
}
}
};
template<class Args, class Catch1, class Catch2, class Catch3, class Catch4, class Catch5, class Catch6,
class Catch7>
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>,
detail::catch_block<Catch7>,detail::catch_all_block> > >, Args> {
public:
Args args;
public:
explicit lambda_functor_base(const Args& a) : args(a) {}
template <class SigArgs> struct sig {
typedef typename
as_lambda_functor<
typename boost::tuples::element<0, Args>::type
>::type lf_type;
typedef typename lf_type::inherited::template sig<SigArgs>::type type;
};
template<class RET, CALL_TEMPLATE_ARGS>
RET call(CALL_FORMAL_ARGS) const {
try
{
return detail::select(::boost::tuples::get<0>(args), CALL_ACTUAL_ARGS);
}
catch (Catch1& e)
{
return
detail::return_or_throw<RET, typename ::boost::tuples::element<1, Args>::type>
::call(::boost::tuples::get<1>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
}
catch (Catch2& e)
{
return
detail::return_or_throw<RET, typename ::boost::tuples::element<2, Args>::type>
::call(::boost::tuples::get<2>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
}
catch (Catch3& e)
{
return
detail::return_or_throw<RET, typename ::boost::tuples::element<3, Args>::type>
::call(::boost::tuples::get<3>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
}
catch (Catch4& e)
{
return
detail::return_or_throw<RET, typename ::boost::tuples::element<4, Args>::type>
::call(::boost::tuples::get<4>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
}
catch (Catch5& e)
{
return
detail::return_or_throw<RET, typename ::boost::tuples::element<5, Args>::type>
::call(::boost::tuples::get<5>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
}
catch (Catch6& e)
{
return
detail::return_or_throw<RET, typename ::boost::tuples::element<6, Args>::type>
::call(::boost::tuples::get<6>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
}
catch (Catch7& e)
{
return
detail::return_or_throw<RET, typename ::boost::tuples::element<7, Args>::type>
::call(::boost::tuples::get<7>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
}
catch (...)
{
return
detail::return_or_throw<RET, typename ::boost::tuples::element<8, Args>::type>
::call(::boost::tuples::get<8>(args), CALL_ACTUAL_ARGS);
}
}
};
// 9 catch types case
template<class Args, class Catch1, class Catch2, class Catch3, class Catch4, class Catch5, class Catch6,
class Catch7, class Catch8, class Catch9>
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>,
detail::catch_block<Catch7>, detail::catch_block<Catch8>, detail::catch_block<Catch9> > > >, Args> {
public:
Args args;
public:
explicit lambda_functor_base(const Args& a) : args(a) {}
template <class SigArgs> struct sig {
typedef typename
as_lambda_functor<
typename boost::tuples::element<0, Args>::type
>::type lf_type;
typedef typename lf_type::inherited::template sig<SigArgs>::type type;
};
template<class RET, CALL_TEMPLATE_ARGS>
RET call(CALL_FORMAL_ARGS) const {
try
{
return detail::select(::boost::tuples::get<0>(args), CALL_ACTUAL_ARGS);
}
catch (Catch1& e)
{
return
detail::return_or_throw<RET, typename ::boost::tuples::element<1, Args>::type>
::call(::boost::tuples::get<1>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
}
catch (Catch2& e)
{
return
detail::return_or_throw<RET, typename ::boost::tuples::element<2, Args>::type>
::call(::boost::tuples::get<2>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
}
catch (Catch3& e)
{
return
detail::return_or_throw<RET, typename ::boost::tuples::element<3, Args>::type>
::call(::boost::tuples::get<3>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
}
catch (Catch4& e)
{
return
detail::return_or_throw<RET, typename ::boost::tuples::element<4, Args>::type>
::call(::boost::tuples::get<4>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
}
catch (Catch5& e)
{
return
detail::return_or_throw<RET, typename ::boost::tuples::element<5, Args>::type>
::call(::boost::tuples::get<5>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
}
catch (Catch6& e)
{
return
detail::return_or_throw<RET, typename ::boost::tuples::element<6, Args>::type>
::call(::boost::tuples::get<6>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
}
catch (Catch7& e)
{
return
detail::return_or_throw<RET, typename ::boost::tuples::element<7, Args>::type>
::call(::boost::tuples::get<7>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
}
catch (Catch8& e)
{
return
detail::return_or_throw<RET, typename ::boost::tuples::element<8, Args>::type>
::call(::boost::tuples::get<8>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
}
catch (Catch9& e)
{
return
detail::return_or_throw<RET, typename ::boost::tuples::element<9, Args>::type>
::call(::boost::tuples::get<9>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
}
}
};
template<class Args, class Catch1, class Catch2, class Catch3, class Catch4, class Catch5, class Catch6,
class Catch7, class Catch8>
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>,
detail::catch_block<Catch7>, detail::catch_block<Catch8>,detail::catch_all_block> > >, Args> {
public:
Args args;
public:
explicit lambda_functor_base(const Args& a) : args(a) {}
template <class SigArgs> struct sig {
typedef typename
as_lambda_functor<
typename boost::tuples::element<0, Args>::type
>::type lf_type;
typedef typename lf_type::inherited::template sig<SigArgs>::type type;
};
template<class RET, CALL_TEMPLATE_ARGS>
RET call(CALL_FORMAL_ARGS) const {
try
{
return detail::select(::boost::tuples::get<0>(args), CALL_ACTUAL_ARGS);
}
catch (Catch1& e)
{
return
detail::return_or_throw<RET, typename ::boost::tuples::element<1, Args>::type>
::call(::boost::tuples::get<1>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
}
catch (Catch2& e)
{
return
detail::return_or_throw<RET, typename ::boost::tuples::element<2, Args>::type>
::call(::boost::tuples::get<2>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
}
catch (Catch3& e)
{
return
detail::return_or_throw<RET, typename ::boost::tuples::element<3, Args>::type>
::call(::boost::tuples::get<3>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
}
catch (Catch4& e)
{
return
detail::return_or_throw<RET, typename ::boost::tuples::element<4, Args>::type>
::call(::boost::tuples::get<4>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
}
catch (Catch5& e)
{
return
detail::return_or_throw<RET, typename ::boost::tuples::element<5, Args>::type>
::call(::boost::tuples::get<5>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
}
catch (Catch6& e)
{
return
detail::return_or_throw<RET, typename ::boost::tuples::element<6, Args>::type>
::call(::boost::tuples::get<6>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
}
catch (Catch7& e)
{
return
detail::return_or_throw<RET, typename ::boost::tuples::element<7, Args>::type>
::call(::boost::tuples::get<7>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
}
catch (Catch8& e)
{
return
detail::return_or_throw<RET, typename ::boost::tuples::element<8, Args>::type>
::call(::boost::tuples::get<8>(args), CALL_ACTUAL_ARGS_NO_ENV, e);
}
catch (...)
{
return
detail::return_or_throw<RET, typename ::boost::tuples::element<9, Args>::type>
::call(::boost::tuples::get<9>(args), CALL_ACTUAL_ARGS);
}
}
};
} // namespace lambda
} // namespace boost
#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?