Mercurial > hg > vamp-build-and-test
comparison DEPENDENCIES/generic/include/boost/phoenix/support/detail/iterate_define.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 Copyright (c) 2010 Thomas Heller | |
3 | |
4 Distributed under the Boost Software License, Version 1.0. (See accompanying | |
5 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) | |
6 ==============================================================================*/ | |
7 | |
8 #if !BOOST_PHOENIX_IS_ITERATING | |
9 | |
10 #define BOOST_PHOENIX_typename_A(N) \ | |
11 BOOST_PP_ENUM_PARAMS(N, typename A) \ | |
12 /**/ | |
13 | |
14 #define BOOST_PHOENIX_typename_A_void(N) \ | |
15 BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(N, typename A, void) \ | |
16 /**/ | |
17 | |
18 #define BOOST_PHOENIX_A(N) \ | |
19 BOOST_PP_ENUM_PARAMS(N, A) \ | |
20 /**/ | |
21 | |
22 #define BOOST_PHOENIX_A_ref(N) \ | |
23 BOOST_PP_ENUM_BINARY_PARAMS(N, A, & BOOST_PP_INTERCEPT) \ | |
24 /**/ | |
25 | |
26 #define BOOST_PHOENIX_A_const_ref(N) \ | |
27 BOOST_PP_ENUM_BINARY_PARAMS(N, A, const& BOOST_PP_INTERCEPT) \ | |
28 /**/ | |
29 | |
30 #define BOOST_PHOENIX_A_a(N) \ | |
31 BOOST_PP_ENUM_BINARY_PARAMS(N, A, a) \ | |
32 /**/ | |
33 | |
34 #define BOOST_PHOENIX_A_ref_a(N) \ | |
35 BOOST_PP_ENUM_BINARY_PARAMS(N, A, & a) \ | |
36 /**/ | |
37 | |
38 #define BOOST_PHOENIX_A_const_ref_a(N) \ | |
39 BOOST_PP_ENUM_BINARY_PARAMS(N, A, const& a) \ | |
40 /**/ | |
41 | |
42 #define BOOST_PHOENIX_a(N) \ | |
43 BOOST_PP_ENUM_PARAMS(N, a) \ | |
44 /**/ | |
45 | |
46 #else | |
47 | |
48 #include <boost/preprocessor/repetition/repeat.hpp> | |
49 #include <boost/preprocessor/repetition/enum_binary_params.hpp> | |
50 #include <boost/preprocessor/repetition/enum_params.hpp> | |
51 #include <boost/preprocessor/repetition/enum_params_with_a_default.hpp> | |
52 #include <boost/preprocessor/seq/elem.hpp> | |
53 #include <boost/preprocessor/seq/enum.hpp> | |
54 #include <boost/preprocessor/seq/for_each_i.hpp> | |
55 #include <boost/preprocessor/seq/for_each_product.hpp> | |
56 #include <boost/preprocessor/seq/size.hpp> | |
57 #include <boost/preprocessor/tuple/elem.hpp> | |
58 | |
59 #define BOOST_PHOENIX_ITERATION \ | |
60 BOOST_PP_ITERATION() \ | |
61 /**/ | |
62 | |
63 #define BOOST_PHOENIX_typename_A \ | |
64 BOOST_PP_ENUM_PARAMS(BOOST_PHOENIX_ITERATION, typename A) \ | |
65 /**/ | |
66 | |
67 #define BOOST_PHOENIX_typename_A_void \ | |
68 BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(BOOST_PHOENIX_ITERATION, typename A, void) | |
69 /**/ | |
70 | |
71 #define BOOST_PHOENIX_A \ | |
72 BOOST_PP_ENUM_PARAMS(BOOST_PHOENIX_ITERATION, A) \ | |
73 /**/ | |
74 | |
75 #define BOOST_PHOENIX_A_ref \ | |
76 BOOST_PP_ENUM_BINARY_PARAMS(BOOST_PHOENIX_ITERATION, A, & BOOST_PP_INTERCEPT)\ | |
77 /**/ | |
78 | |
79 #define BOOST_PHOENIX_A_const_ref \ | |
80 BOOST_PP_ENUM_BINARY_PARAMS(BOOST_PHOENIX_ITERATION, A, const& BOOST_PP_INTERCEPT)\ | |
81 /**/ | |
82 | |
83 #define BOOST_PHOENIX_A_a \ | |
84 BOOST_PP_ENUM_BINARY_PARAMS(BOOST_PHOENIX_ITERATION, A, a) \ | |
85 /**/ | |
86 | |
87 #define BOOST_PHOENIX_A_ref_a \ | |
88 BOOST_PP_ENUM_BINARY_PARAMS(BOOST_PHOENIX_ITERATION, A, & a) \ | |
89 /**/ | |
90 | |
91 #define BOOST_PHOENIX_A_const_ref_a \ | |
92 BOOST_PP_ENUM_BINARY_PARAMS(BOOST_PHOENIX_ITERATION, A, const& a) \ | |
93 /**/ | |
94 | |
95 #define BOOST_PHOENIX_a \ | |
96 BOOST_PP_ENUM_PARAMS(BOOST_PHOENIX_ITERATION, a) \ | |
97 /**/ | |
98 | |
99 ///////////////////////////////////////////////////////////////////////////// | |
100 // Begin Perfect Forward argument permutation calculation | |
101 ///////////////////////////////////////////////////////////////////////////// | |
102 #define BOOST_PHOENIX_M0_R(_, N, __) \ | |
103 (((A ## N)(&))((A ## N)(const&))) \ | |
104 /**/ | |
105 | |
106 #define BOOST_PHOENIX_M0 \ | |
107 BOOST_PP_REPEAT(BOOST_PHOENIX_ITERATION, BOOST_PHOENIX_M0_R, _) \ | |
108 /**/ | |
109 | |
110 #define BOOST_PHOENIX_M1_R_R(_, N, SEQ) \ | |
111 BOOST_PP_SEQ_ELEM(N, SEQ) \ | |
112 /**/ | |
113 | |
114 #define BOOST_PHOENIX_M1_R(R, __, ___, ELEM) \ | |
115 (BOOST_PP_REPEAT(BOOST_PP_SEQ_SIZE(ELEM), BOOST_PHOENIX_M1_R_R, ELEM)) \ | |
116 /**/ | |
117 | |
118 #define BOOST_PHOENIX_M1(R, PRODUCT) \ | |
119 ((BOOST_PP_SEQ_ENUM \ | |
120 (BOOST_PP_SEQ_FOR_EACH_I_R \ | |
121 (R, BOOST_PHOENIX_M1_R, _, PRODUCT)))) \ | |
122 /**/ | |
123 | |
124 #define BOOST_PHOENIX_PERM_SEQ \ | |
125 BOOST_PP_SEQ_FOR_EACH_PRODUCT(BOOST_PHOENIX_M1, BOOST_PHOENIX_M0) \ | |
126 /**/ | |
127 //////////////////////////////////////////////////////////////////////////// | |
128 // End | |
129 //////////////////////////////////////////////////////////////////////////// | |
130 | |
131 #define BOOST_PHOENIX_PERM_SIZE \ | |
132 BOOST_PP_SEQ_SIZE(BOOST_PHOENIX_PERM_SEQ) \ | |
133 /**/ | |
134 | |
135 #define BOOST_PHOENIX_M2(_, N, TUPLE) \ | |
136 BOOST_PP_COMMA_IF(N) BOOST_PP_TUPLE_ELEM(BOOST_PHOENIX_ITERATION, N, TUPLE) \ | |
137 /**/ | |
138 | |
139 #define BOOST_PHOENIX_M3(_, N, TUPLE) \ | |
140 BOOST_PP_COMMA_IF(N) BOOST_PP_TUPLE_ELEM(BOOST_PHOENIX_ITERATION, N, TUPLE) a ## N\ | |
141 /**/ | |
142 | |
143 #define BOOST_PHOENIX_PERM_ELEM(N) \ | |
144 BOOST_PP_SEQ_ELEM(N, BOOST_PHOENIX_PERM_SEQ) \ | |
145 /**/ | |
146 | |
147 #define BOOST_PHOENIX_PERM_A(N) \ | |
148 BOOST_PP_REPEAT(BOOST_PHOENIX_ITERATION, BOOST_PHOENIX_M2, BOOST_PHOENIX_PERM_ELEM(N))\ | |
149 /**/ | |
150 | |
151 #define BOOST_PHOENIX_PERM_A_a(N) \ | |
152 BOOST_PP_REPEAT(BOOST_PHOENIX_ITERATION, BOOST_PHOENIX_M3, BOOST_PHOENIX_PERM_ELEM(N))\ | |
153 /**/ | |
154 | |
155 #endif |