File indexing completed on 2025-01-18 09:47:40
0001
0002 #if !BOOST_PHOENIX_IS_ITERATING
0003
0004 #ifndef BOOST_PHOENIX_STATEMENT_DETAIL_CATCH_PUSH_BACK_HPP
0005 #define BOOST_PHOENIX_STATEMENT_DETAIL_CATCH_PUSH_BACK_HPP
0006
0007 #include <boost/phoenix/support/iterate.hpp>
0008
0009 #if !defined(BOOST_PHOENIX_DONT_USE_PREPROCESSED_FILES)
0010
0011 #include <boost/phoenix/statement/detail/preprocessed/catch_push_back.hpp>
0012
0013 #else
0014
0015 #if defined(__WAVE__) && defined(BOOST_PHOENIX_CREATE_PREPROCESSED_FILES)
0016 #pragma wave option(preserve: 2, line: 0, output: "preprocessed/catch_push_back_" BOOST_PHOENIX_LIMIT_STR ".hpp")
0017 #endif
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027 #if defined(__WAVE__) && defined(BOOST_PHOENIX_CREATE_PREPROCESSED_FILES)
0028 #pragma wave option(preserve: 1)
0029 #endif
0030
0031 #define BOOST_PHOENIX_CATCH_PUSH_BACK_R0(Z, N, DATA) \
0032 BOOST_PP_COMMA_IF(N) \
0033 typename proto::result_of::child_c<TryCatch, N>::type \
0034
0035
0036 #define BOOST_PHOENIX_CATCH_PUSH_BACK_R1(Z, N, DATA) \
0037 BOOST_PP_COMMA_IF(N) proto::child_c<N>(try_catch) \
0038
0039
0040 #define BOOST_PHOENIX_ITERATION_PARAMS \
0041 (3, (2, BOOST_PHOENIX_CATCH_LIMIT, \
0042 <boost/phoenix/statement/detail/catch_push_back.hpp>))
0043 #include BOOST_PHOENIX_ITERATE()
0044
0045 #undef BOOST_PHOENIX_CATCH_PUSH_BACK_R0
0046 #undef BOOST_PHOENIX_CATCH_PUSH_BACK_R1
0047
0048 #if defined(__WAVE__) && defined(BOOST_PHOENIX_CREATE_PREPROCESSED_FILES)
0049 #pragma wave option(output: null)
0050 #endif
0051
0052 #endif
0053
0054 #endif
0055
0056 #else
0057 template <typename TryCatch, typename Exception, typename Capture, typename Expr>
0058 struct catch_push_back<TryCatch, Exception, Capture, Expr, BOOST_PHOENIX_ITERATION>
0059 {
0060 typedef
0061 typename proto::result_of::make_expr<
0062 phoenix::tag::catch_
0063 , proto::basic_default_domain
0064 , catch_exception<Exception>
0065 , Capture
0066 , Expr
0067 >::type
0068 catch_expr;
0069
0070 typedef phoenix::expression::try_catch<
0071 BOOST_PP_REPEAT(BOOST_PHOENIX_ITERATION, BOOST_PHOENIX_CATCH_PUSH_BACK_R0, _)
0072 , catch_expr> gen_type;
0073 typedef typename gen_type::type type;
0074
0075 static type
0076 make(
0077 TryCatch const& try_catch
0078 , Capture const& capture
0079 , Expr const& catch_
0080 )
0081 {
0082 return
0083 gen_type::make(
0084 BOOST_PP_REPEAT(
0085 BOOST_PHOENIX_ITERATION
0086 , BOOST_PHOENIX_CATCH_PUSH_BACK_R1
0087 , _
0088 )
0089 , proto::make_expr<
0090 phoenix::tag::catch_
0091 , proto::basic_default_domain
0092 >(catch_exception<Exception>(), capture, catch_)
0093 );
0094 }
0095 };
0096
0097 template <typename TryCatch, typename Exception, typename Expr>
0098 struct catch_push_back<TryCatch, Exception, void, Expr, BOOST_PHOENIX_ITERATION>
0099 {
0100 typedef
0101 typename proto::result_of::make_expr<
0102 phoenix::tag::catch_
0103 , proto::basic_default_domain
0104 , catch_exception<Exception>
0105 , Expr
0106 >::type
0107 catch_expr;
0108
0109 typedef phoenix::expression::try_catch<
0110 BOOST_PP_REPEAT(BOOST_PHOENIX_ITERATION, BOOST_PHOENIX_CATCH_PUSH_BACK_R0, _)
0111 , catch_expr> gen_type;
0112 typedef typename gen_type::type type;
0113
0114 static type
0115 make(
0116 TryCatch const& try_catch
0117 , Expr const& catch_
0118 )
0119 {
0120 return
0121 gen_type::make(
0122 BOOST_PP_REPEAT(
0123 BOOST_PHOENIX_ITERATION
0124 , BOOST_PHOENIX_CATCH_PUSH_BACK_R1
0125 , _
0126 )
0127 , proto::make_expr<
0128 phoenix::tag::catch_
0129 , proto::basic_default_domain
0130 >(catch_exception<Exception>(), catch_)
0131 );
0132 }
0133 };
0134
0135 template <typename TryCatch, typename Expr>
0136 struct catch_all_push_back<TryCatch, Expr, BOOST_PHOENIX_ITERATION>
0137 {
0138 typedef
0139 typename proto::result_of::make_expr<
0140 phoenix::tag::catch_all
0141 , proto::basic_default_domain
0142 , Expr
0143 >::type
0144 catch_expr;
0145
0146 typedef phoenix::expression::try_catch<
0147 BOOST_PP_REPEAT(BOOST_PHOENIX_ITERATION, BOOST_PHOENIX_CATCH_PUSH_BACK_R0, _)
0148 , catch_expr> gen_type;
0149 typedef typename gen_type::type type;
0150
0151 static type
0152 make(
0153 TryCatch const& try_catch
0154 , Expr const& catch_
0155 )
0156 {
0157 return
0158 gen_type::make(
0159 BOOST_PP_REPEAT(
0160 BOOST_PHOENIX_ITERATION
0161 , BOOST_PHOENIX_CATCH_PUSH_BACK_R1
0162 , _
0163 )
0164 , proto::make_expr<
0165 phoenix::tag::catch_all
0166 , proto::basic_default_domain
0167 >(catch_)
0168 );
0169 }
0170 };
0171
0172 #endif