comparison DEPENDENCIES/generic/include/boost/phoenix/statement/detail/catch_push_back.hpp @ 16:2665513ce2d3

Add boost headers
author Chris Cannam
date Tue, 05 Aug 2014 11:11:38 +0100
parents
children
comparison
equal deleted inserted replaced
15:663ca0da4350 16:2665513ce2d3
1
2 #if !BOOST_PHOENIX_IS_ITERATING
3
4 #ifndef BOOST_PHOENIX_STATEMENT_DETAIL_CATCH_PUSH_BACK_HPP
5 #define BOOST_PHOENIX_STATEMENT_DETAIL_CATCH_PUSH_BACK_HPP
6
7 #include <boost/phoenix/support/iterate.hpp>
8
9 #if !defined(BOOST_PHOENIX_DONT_USE_PREPROCESSED_FILES)
10
11 #include <boost/phoenix/statement/detail/preprocessed/catch_push_back.hpp>
12
13 #else
14
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")
17 #endif
18
19 /*==============================================================================
20 Copyright (c) 2005-2010 Joel de Guzman
21 Copyright (c) 2010 Thomas Heller
22
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 ==============================================================================*/
26
27 #if defined(__WAVE__) && defined(BOOST_PHOENIX_CREATE_PREPROCESSED_FILES)
28 #pragma wave option(preserve: 1)
29 #endif
30
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 \
34 /**/
35
36 #define BOOST_PHOENIX_CATCH_PUSH_BACK_R1(Z, N, DATA) \
37 BOOST_PP_COMMA_IF(N) proto::child_c<N>(try_catch) \
38 /**/
39
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()
44
45 #undef BOOST_PHOENIX_CATCH_PUSH_BACK_R0
46 #undef BOOST_PHOENIX_CATCH_PUSH_BACK_R1
47
48 #if defined(__WAVE__) && defined(BOOST_PHOENIX_CREATE_PREPROCESSED_FILES)
49 #pragma wave option(output: null)
50 #endif
51
52 #endif // BOOST_PHOENIX_DONT_USE_PREPROCESSED_FILES
53
54 #endif
55
56 #else
57 template <typename TryCatch, typename Exception, typename Expr>
58 struct catch_push_back<TryCatch, Exception, Expr, BOOST_PHOENIX_ITERATION>
59 {
60 typedef
61 typename proto::result_of::make_expr<
62 phoenix::tag::catch_
63 , proto::basic_default_domain
64 , catch_exception<Exception>
65 , Expr
66 >::type
67 catch_expr;
68
69 typedef phoenix::expression::try_catch<
70 BOOST_PP_REPEAT(BOOST_PHOENIX_ITERATION, BOOST_PHOENIX_CATCH_PUSH_BACK_R0, _)
71 , catch_expr> gen_type;
72 typedef typename gen_type::type type;
73
74 static type
75 make(
76 TryCatch const& try_catch
77 , Expr const& catch_
78 )
79 {
80 return
81 gen_type::make(
82 BOOST_PP_REPEAT(
83 BOOST_PHOENIX_ITERATION
84 , BOOST_PHOENIX_CATCH_PUSH_BACK_R1
85 , _
86 )
87 , proto::make_expr<
88 phoenix::tag::catch_
89 , proto::basic_default_domain
90 >(catch_exception<Exception>(), catch_)
91 );
92 }
93 };
94
95 template <typename TryCatch, typename Expr>
96 struct catch_all_push_back<TryCatch, Expr, BOOST_PHOENIX_ITERATION>
97 {
98 typedef
99 typename proto::result_of::make_expr<
100 phoenix::tag::catch_all
101 , proto::basic_default_domain
102 , Expr
103 >::type
104 catch_expr;
105
106 typedef phoenix::expression::try_catch<
107 BOOST_PP_REPEAT(BOOST_PHOENIX_ITERATION, BOOST_PHOENIX_CATCH_PUSH_BACK_R0, _)
108 , catch_expr> gen_type;
109 typedef typename gen_type::type type;
110
111 static type
112 make(
113 TryCatch const& try_catch
114 , Expr const& catch_
115 )
116 {
117 return
118 gen_type::make(
119 BOOST_PP_REPEAT(
120 BOOST_PHOENIX_ITERATION
121 , BOOST_PHOENIX_CATCH_PUSH_BACK_R1
122 , _
123 )
124 , proto::make_expr<
125 phoenix::tag::catch_all
126 , proto::basic_default_domain
127 >(catch_)
128 );
129 }
130 };
131
132 #endif