2 #if !BOOST_PHOENIX_IS_ITERATING
4 #ifndef BOOST_PHOENIX_STATEMENT_DETAIL_CATCH_PUSH_BACK_HPP
5 #define BOOST_PHOENIX_STATEMENT_DETAIL_CATCH_PUSH_BACK_HPP
7 #include <boost/phoenix/support/iterate.hpp>
9 #if !defined(BOOST_PHOENIX_DONT_USE_PREPROCESSED_FILES)
11 #include <boost/phoenix/statement/detail/preprocessed/catch_push_back.hpp>
15 #if defined(__WAVE__) && defined(BOOST_PHOENIX_CREATE_PREPROCESSED_FILES)
16 #pragma wave option(preserve: 2, line: 0, output: "preprocessed/catch_push_back_" BOOST_PHOENIX_LIMIT_STR ".hpp")
19 /*==============================================================================
20 Copyright (c) 2005-2010 Joel de Guzman
21 Copyright (c) 2010 Thomas Heller
23 Distributed under the Boost Software License, Version 1.0. (See accompanying
24 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
25 ==============================================================================*/
27 #if defined(__WAVE__) && defined(BOOST_PHOENIX_CREATE_PREPROCESSED_FILES)
28 #pragma wave option(preserve: 1)
31 #define BOOST_PHOENIX_CATCH_PUSH_BACK_R0(Z, N, DATA) \
32 BOOST_PP_COMMA_IF(N) \
33 typename proto::result_of::child_c<TryCatch, N>::type \
36 #define BOOST_PHOENIX_CATCH_PUSH_BACK_R1(Z, N, DATA) \
37 BOOST_PP_COMMA_IF(N) proto::child_c<N>(try_catch) \
40 #define BOOST_PHOENIX_ITERATION_PARAMS \
41 (3, (2, BOOST_PHOENIX_CATCH_LIMIT, \
42 <boost/phoenix/statement/detail/catch_push_back.hpp>))
43 #include BOOST_PHOENIX_ITERATE()
45 #undef BOOST_PHOENIX_CATCH_PUSH_BACK_R0
46 #undef BOOST_PHOENIX_CATCH_PUSH_BACK_R1
48 #if defined(__WAVE__) && defined(BOOST_PHOENIX_CREATE_PREPROCESSED_FILES)
49 #pragma wave option(output: null)
52 #endif // BOOST_PHOENIX_DONT_USE_PREPROCESSED_FILES
57 template <typename TryCatch, typename Exception, typename Capture, typename Expr>
58 struct catch_push_back<TryCatch, Exception, Capture, Expr, BOOST_PHOENIX_ITERATION>
61 typename proto::result_of::make_expr<
63 , proto::basic_default_domain
64 , catch_exception<Exception>
70 typedef phoenix::expression::try_catch<
71 BOOST_PP_REPEAT(BOOST_PHOENIX_ITERATION, BOOST_PHOENIX_CATCH_PUSH_BACK_R0, _)
72 , catch_expr> gen_type;
73 typedef typename gen_type::type type;
77 TryCatch const& try_catch
78 , Capture const& capture
85 BOOST_PHOENIX_ITERATION
86 , BOOST_PHOENIX_CATCH_PUSH_BACK_R1
91 , proto::basic_default_domain
92 >(catch_exception<Exception>(), capture, catch_)
97 template <typename TryCatch, typename Exception, typename Expr>
98 struct catch_push_back<TryCatch, Exception, void, Expr, BOOST_PHOENIX_ITERATION>
101 typename proto::result_of::make_expr<
103 , proto::basic_default_domain
104 , catch_exception<Exception>
109 typedef phoenix::expression::try_catch<
110 BOOST_PP_REPEAT(BOOST_PHOENIX_ITERATION, BOOST_PHOENIX_CATCH_PUSH_BACK_R0, _)
111 , catch_expr> gen_type;
112 typedef typename gen_type::type type;
116 TryCatch const& try_catch
123 BOOST_PHOENIX_ITERATION
124 , BOOST_PHOENIX_CATCH_PUSH_BACK_R1
129 , proto::basic_default_domain
130 >(catch_exception<Exception>(), catch_)
135 template <typename TryCatch, typename Expr>
136 struct catch_all_push_back<TryCatch, Expr, BOOST_PHOENIX_ITERATION>
139 typename proto::result_of::make_expr<
140 phoenix::tag::catch_all
141 , proto::basic_default_domain
146 typedef phoenix::expression::try_catch<
147 BOOST_PP_REPEAT(BOOST_PHOENIX_ITERATION, BOOST_PHOENIX_CATCH_PUSH_BACK_R0, _)
148 , catch_expr> gen_type;
149 typedef typename gen_type::type type;
153 TryCatch const& try_catch
160 BOOST_PHOENIX_ITERATION
161 , BOOST_PHOENIX_CATCH_PUSH_BACK_R1
165 phoenix::tag::catch_all
166 , proto::basic_default_domain