Honeycomb  0.1
Component-Model Framework
Preprocessor.h
Go to the documentation of this file.
1 // Honeycomb, Copyright (C) 2015 NewGamePlus Inc. Distributed under the Boost Software License v1.0.
2 #pragma once
3 
4 #include "Honey/Core/Core.h"
5 
6 namespace honey
7 {
8 
11 
13 #define EVAL(...) __VA_ARGS__
14 
16 #define STRINGIFY(s) STRINGIFY_(s)
17 
19 #define TOKCAT(a, b) TOKCAT_(a, b)
20 
22 #define EMPTY
23 #define EMPTYFUNC(...)
25 
27 #define UNBRACKET(...) IFEQUAL(_UNBRACKET_TEST __VA_ARGS__, 1, EVAL __VA_ARGS__, __VA_ARGS__)
28 
30 #define NUMARGS(...) IFEMPTY(0, _NUMARGS(__VA_ARGS__), __VA_ARGS__)
31 
33 #define COMMA ,
34 #define COMMA_IFNOT(Num, CompareNum) IFEQUAL(Num, CompareNum, EMPTY, COMMA)
36 
38 #define IFEMPTY(True, False, ...) TOKCAT(_IFEMPTY_CASE_, _ISEMPTY(__VA_ARGS__))(EVAL(True), EVAL(False))
39 
41 #define IFEQUAL(Num, CompareNum, True, False) IFEMPTY(EVAL(True), EVAL(False), TOKCAT(_ITERATE_, TOKCAT(Num, _##CompareNum)))
42 
44 #define TUPLE_SIZE(t) EVAL(NUMARGS t)
45 #define TUPLE_ELEM(t, i) TOKCAT(_TUPLE_ELEM_,TUPLE_SIZE(t))_ ## i t
47 
50 
52 #define ITERATE_MAX 20
53 
55 
58 #define ITERATE(Min, Max, Func) IFEMPTY(, TOKCAT(_ITERATE_, Min)(Max, Func, 0,,,,,) , TOKCAT(_ITERATE_INIT_##Min##_, Max))
59 #define ITERATE1(Min, Max, Func, a1) IFEMPTY(, TOKCAT(_ITERATE_, Min)(Max, Func, 1,a1,,,,) , TOKCAT(_ITERATE_INIT_##Min##_, Max))
60 #define ITERATE2(Min, Max, Func, a1,a2) IFEMPTY(, TOKCAT(_ITERATE_, Min)(Max, Func, 2,a1,a2,,,) , TOKCAT(_ITERATE_INIT_##Min##_, Max))
61 #define ITERATE3(Min, Max, Func, a1,a2,a3) IFEMPTY(, TOKCAT(_ITERATE_, Min)(Max, Func, 3,a1,a2,a3,,) , TOKCAT(_ITERATE_INIT_##Min##_, Max))
62 #define ITERATE4(Min, Max, Func, a1,a2,a3,a4) IFEMPTY(, TOKCAT(_ITERATE_, Min)(Max, Func, 4,a1,a2,a3,a4,) , TOKCAT(_ITERATE_INIT_##Min##_, Max))
63 #define ITERATE5(Min, Max, Func, a1,a2,a3,a4,a5) IFEMPTY(, TOKCAT(_ITERATE_, Min)(Max, Func, 5,a1,a2,a3,a4,a5) , TOKCAT(_ITERATE_INIT_##Min##_, Max))
64 
73 #define ITERATE_(Min, Max, Func) IFEMPTY(, TOKCAT(_ITERATE__, Min)(Max, Func, 0,,,,,) , TOKCAT(_ITERATE_INIT_##Min##_, Max))
75 #define ITERATE1_(Min, Max, Func, a1) IFEMPTY(, TOKCAT(_ITERATE__, Min)(Max, Func, 1,a1,,,,) , TOKCAT(_ITERATE_INIT_##Min##_, Max))
76 #define ITERATE2_(Min, Max, Func, a1,a2) IFEMPTY(, TOKCAT(_ITERATE__, Min)(Max, Func, 2,a1,a2,,,) , TOKCAT(_ITERATE_INIT_##Min##_, Max))
77 #define ITERATE3_(Min, Max, Func, a1,a2,a3) IFEMPTY(, TOKCAT(_ITERATE__, Min)(Max, Func, 3,a1,a2,a3,,) , TOKCAT(_ITERATE_INIT_##Min##_, Max))
78 #define ITERATE4_(Min, Max, Func, a1,a2,a3,a4) IFEMPTY(, TOKCAT(_ITERATE__, Min)(Max, Func, 4,a1,a2,a3,a4,) , TOKCAT(_ITERATE_INIT_##Min##_, Max))
79 #define ITERATE5_(Min, Max, Func, a1,a2,a3,a4,a5) IFEMPTY(, TOKCAT(_ITERATE__, Min)(Max, Func, 5,a1,a2,a3,a4,a5) , TOKCAT(_ITERATE_INIT_##Min##_, Max))
80 
81 #define ITERATE__(Min, Max, Func) IFEMPTY(, TOKCAT(_ITERATE___, Min)(Max, Func, 0,,,,,) , TOKCAT(_ITERATE_INIT_##Min##_, Max))
82 #define ITERATE1__(Min, Max, Func, a1) IFEMPTY(, TOKCAT(_ITERATE___, Min)(Max, Func, 1,a1,,,,) , TOKCAT(_ITERATE_INIT_##Min##_, Max))
83 #define ITERATE2__(Min, Max, Func, a1,a2) IFEMPTY(, TOKCAT(_ITERATE___, Min)(Max, Func, 2,a1,a2,,,) , TOKCAT(_ITERATE_INIT_##Min##_, Max))
84 #define ITERATE3__(Min, Max, Func, a1,a2,a3) IFEMPTY(, TOKCAT(_ITERATE___, Min)(Max, Func, 3,a1,a2,a3,,) , TOKCAT(_ITERATE_INIT_##Min##_, Max))
85 #define ITERATE4__(Min, Max, Func, a1,a2,a3,a4) IFEMPTY(, TOKCAT(_ITERATE___, Min)(Max, Func, 4,a1,a2,a3,a4,) , TOKCAT(_ITERATE_INIT_##Min##_, Max))
86 #define ITERATE5__(Min, Max, Func, a1,a2,a3,a4,a5) IFEMPTY(, TOKCAT(_ITERATE___, Min)(Max, Func, 5,a1,a2,a3,a4,a5) , TOKCAT(_ITERATE_INIT_##Min##_, Max))
87 
90 #define PP_ADD(Lhs, Rhs) _ADD_0(Lhs, Rhs)
91 #define PP_SUB(Lhs, Rhs) _SUBTRACT_0(Lhs, Rhs)
93 
94 
96 
97 //====================================================
98 // Private
99 //====================================================
100 #define TOKCAT_(a, b) a##b
101 #define STRINGIFY_(s) #s
102 #define _TOKCAT_2(a1, a2) a1 ## a2
103 #define _TOKCAT_3(a1, a2, a3) a1 ## a2 ## a3
104 #define _TOKCAT_4(a1, a2, a3, a4) a1 ## a2 ## a3 ## a4
105 #define _TOKCAT_5(a1, a2, a3, a4, a5) a1 ## a2 ## a3 ## a4 ## a5
106 #define _TOKCAT(...) EVAL(TOKCAT(_TOKCAT_, _NUMARGS(__VA_ARGS__))(__VA_ARGS__))
107 
108 #define _UNBRACKET_TEST(...) 1
109 
110 #define _NUMARGS(...) \
111  EVAL(_NUMARGS_FUNC(__VA_ARGS__, \
112  10, 9, 8, 7, 6, 5, 4, 3, 2, 1 \
113  )) \
114 
115 #define _NUMARGS_FUNC( \
116  _00,_01,_02,_03,_04,_05,_06,_07,_08,_09, \
117  N,...) N \
118 
119 #define _HASCOMMA(...) \
121  EVAL(_NUMARGS_FUNC(__VA_ARGS__, \
122  1, 1, 1, 1, 1, 1, 1, 1, 1, 0, \
123  )) \
124 
125 #define _ISEMPTY(...) \
127  _HASCOMMA( _TOKCAT( _ISEMPTY_CASE_, _HASCOMMA(__VA_ARGS__), \
128  _HASCOMMA(_ISEMPTY_BRACKET_TEST __VA_ARGS__), \
129  _HASCOMMA(__VA_ARGS__ (EMPTY)), \
130  _HASCOMMA(_ISEMPTY_BRACKET_TEST __VA_ARGS__ (EMPTY)) \
131  ) \
132  ) \
133 
134 #define _ISEMPTY_BRACKET_TEST(...) ,
135 #define _ISEMPTY_CASE_0001 ,
136 #define _IFEMPTY_CASE_0(True, False) False
137 #define _IFEMPTY_CASE_1(True, False) True
138 
139 #define _TUPLE_ELEM_1_0(_0) _0
140 #define _TUPLE_ELEM_2_0(_0,_1) _0
141 #define _TUPLE_ELEM_2_1(_0,_1) _1
142 #define _TUPLE_ELEM_3_0(_0,_1,_2) _0
143 #define _TUPLE_ELEM_3_1(_0,_1,_2) _1
144 #define _TUPLE_ELEM_3_2(_0,_1,_2) _2
145 #define _TUPLE_ELEM_4_0(_0,_1,_2,_3) _0
146 #define _TUPLE_ELEM_4_1(_0,_1,_2,_3) _1
147 #define _TUPLE_ELEM_4_2(_0,_1,_2,_3) _2
148 #define _TUPLE_ELEM_4_3(_0,_1,_2,_3) _3
149 #define _TUPLE_ELEM_5_0(_0,_1,_2,_3,_4) _0
150 #define _TUPLE_ELEM_5_1(_0,_1,_2,_3,_4) _1
151 #define _TUPLE_ELEM_5_2(_0,_1,_2,_3,_4) _2
152 #define _TUPLE_ELEM_5_3(_0,_1,_2,_3,_4) _3
153 #define _TUPLE_ELEM_5_4(_0,_1,_2,_3,_4) _4
154 
156 #define _ITERATE_INIT_1_0
157 #define _ITERATE_INIT_2_0
158 #define _ITERATE_INIT_2_1
159 
161 #define _ITERATE_0_0
162 #define _ITERATE_1_1
163 #define _ITERATE_2_2
164 #define _ITERATE_3_3
165 #define _ITERATE_4_4
166 #define _ITERATE_5_5
167 #define _ITERATE_6_6
168 #define _ITERATE_7_7
169 #define _ITERATE_8_8
170 #define _ITERATE_9_9
171 #define _ITERATE_10_10
172 #define _ITERATE_11_11
173 #define _ITERATE_12_12
174 #define _ITERATE_13_13
175 #define _ITERATE_14_14
176 #define _ITERATE_15_15
177 #define _ITERATE_16_16
178 #define _ITERATE_17_17
179 #define _ITERATE_18_18
180 #define _ITERATE_19_19
181 #define _ITERATE_20_20
182 
183 
184 #define _ITERATE_FUNC_0(Func, It, a1,a2,a3,a4,a5 ) Func(It)
185 #define _ITERATE_FUNC_1(Func, It, a1,a2,a3,a4,a5 ) Func(It,a1)
186 #define _ITERATE_FUNC_2(Func, It, a1,a2,a3,a4,a5 ) Func(It,a1,a2)
187 #define _ITERATE_FUNC_3(Func, It, a1,a2,a3,a4,a5 ) Func(It,a1,a2,a3)
188 #define _ITERATE_FUNC_4(Func, It, a1,a2,a3,a4,a5 ) Func(It,a1,a2,a3,a4)
189 #define _ITERATE_FUNC_5(Func, It, a1,a2,a3,a4,a5 ) Func(It,a1,a2,a3,a4,a5)
190 
191 #define _ITERATE_0(Max, Func, ac,a1,a2,a3,a4,a5 ) TOKCAT(_ITERATE_FUNC_, ac)(Func, 0, a1,a2,a3,a4,a5 ) IFEMPTY(, _ITERATE_1(Max, Func, ac,a1,a2,a3,a4,a5 ), TOKCAT(_ITERATE_0_, Max))
192 #define _ITERATE_1(Max, Func, ac,a1,a2,a3,a4,a5 ) TOKCAT(_ITERATE_FUNC_, ac)(Func, 1, a1,a2,a3,a4,a5 ) IFEMPTY(, _ITERATE_2(Max, Func, ac,a1,a2,a3,a4,a5 ), TOKCAT(_ITERATE_1_, Max))
193 #define _ITERATE_2(Max, Func, ac,a1,a2,a3,a4,a5 ) TOKCAT(_ITERATE_FUNC_, ac)(Func, 2, a1,a2,a3,a4,a5 ) IFEMPTY(, _ITERATE_3(Max, Func, ac,a1,a2,a3,a4,a5 ), TOKCAT(_ITERATE_2_, Max))
194 #define _ITERATE_3(Max, Func, ac,a1,a2,a3,a4,a5 ) TOKCAT(_ITERATE_FUNC_, ac)(Func, 3, a1,a2,a3,a4,a5 ) IFEMPTY(, _ITERATE_4(Max, Func, ac,a1,a2,a3,a4,a5 ), TOKCAT(_ITERATE_3_, Max))
195 #define _ITERATE_4(Max, Func, ac,a1,a2,a3,a4,a5 ) TOKCAT(_ITERATE_FUNC_, ac)(Func, 4, a1,a2,a3,a4,a5 ) IFEMPTY(, _ITERATE_5(Max, Func, ac,a1,a2,a3,a4,a5 ), TOKCAT(_ITERATE_4_, Max))
196 #define _ITERATE_5(Max, Func, ac,a1,a2,a3,a4,a5 ) TOKCAT(_ITERATE_FUNC_, ac)(Func, 5, a1,a2,a3,a4,a5 ) IFEMPTY(, _ITERATE_6(Max, Func, ac,a1,a2,a3,a4,a5 ), TOKCAT(_ITERATE_5_, Max))
197 #define _ITERATE_6(Max, Func, ac,a1,a2,a3,a4,a5 ) TOKCAT(_ITERATE_FUNC_, ac)(Func, 6, a1,a2,a3,a4,a5 ) IFEMPTY(, _ITERATE_7(Max, Func, ac,a1,a2,a3,a4,a5 ), TOKCAT(_ITERATE_6_, Max))
198 #define _ITERATE_7(Max, Func, ac,a1,a2,a3,a4,a5 ) TOKCAT(_ITERATE_FUNC_, ac)(Func, 7, a1,a2,a3,a4,a5 ) IFEMPTY(, _ITERATE_8(Max, Func, ac,a1,a2,a3,a4,a5 ), TOKCAT(_ITERATE_7_, Max))
199 #define _ITERATE_8(Max, Func, ac,a1,a2,a3,a4,a5 ) TOKCAT(_ITERATE_FUNC_, ac)(Func, 8, a1,a2,a3,a4,a5 ) IFEMPTY(, _ITERATE_9(Max, Func, ac,a1,a2,a3,a4,a5 ), TOKCAT(_ITERATE_8_, Max))
200 #define _ITERATE_9(Max, Func, ac,a1,a2,a3,a4,a5 ) TOKCAT(_ITERATE_FUNC_, ac)(Func, 9, a1,a2,a3,a4,a5 ) IFEMPTY(, _ITERATE_10(Max, Func, ac,a1,a2,a3,a4,a5 ), TOKCAT(_ITERATE_9_, Max))
201 #define _ITERATE_10(Max, Func, ac,a1,a2,a3,a4,a5 ) TOKCAT(_ITERATE_FUNC_, ac)(Func, 10, a1,a2,a3,a4,a5 ) IFEMPTY(, _ITERATE_11(Max, Func, ac,a1,a2,a3,a4,a5 ), TOKCAT(_ITERATE_10_, Max))
202 #define _ITERATE_11(Max, Func, ac,a1,a2,a3,a4,a5 ) TOKCAT(_ITERATE_FUNC_, ac)(Func, 11, a1,a2,a3,a4,a5 ) IFEMPTY(, _ITERATE_12(Max, Func, ac,a1,a2,a3,a4,a5 ), TOKCAT(_ITERATE_11_, Max))
203 #define _ITERATE_12(Max, Func, ac,a1,a2,a3,a4,a5 ) TOKCAT(_ITERATE_FUNC_, ac)(Func, 12, a1,a2,a3,a4,a5 ) IFEMPTY(, _ITERATE_13(Max, Func, ac,a1,a2,a3,a4,a5 ), TOKCAT(_ITERATE_12_, Max))
204 #define _ITERATE_13(Max, Func, ac,a1,a2,a3,a4,a5 ) TOKCAT(_ITERATE_FUNC_, ac)(Func, 13, a1,a2,a3,a4,a5 ) IFEMPTY(, _ITERATE_14(Max, Func, ac,a1,a2,a3,a4,a5 ), TOKCAT(_ITERATE_13_, Max))
205 #define _ITERATE_14(Max, Func, ac,a1,a2,a3,a4,a5 ) TOKCAT(_ITERATE_FUNC_, ac)(Func, 14, a1,a2,a3,a4,a5 ) IFEMPTY(, _ITERATE_15(Max, Func, ac,a1,a2,a3,a4,a5 ), TOKCAT(_ITERATE_14_, Max))
206 #define _ITERATE_15(Max, Func, ac,a1,a2,a3,a4,a5 ) TOKCAT(_ITERATE_FUNC_, ac)(Func, 15, a1,a2,a3,a4,a5 ) IFEMPTY(, _ITERATE_16(Max, Func, ac,a1,a2,a3,a4,a5 ), TOKCAT(_ITERATE_15_, Max))
207 #define _ITERATE_16(Max, Func, ac,a1,a2,a3,a4,a5 ) TOKCAT(_ITERATE_FUNC_, ac)(Func, 16, a1,a2,a3,a4,a5 ) IFEMPTY(, _ITERATE_17(Max, Func, ac,a1,a2,a3,a4,a5 ), TOKCAT(_ITERATE_16_, Max))
208 #define _ITERATE_17(Max, Func, ac,a1,a2,a3,a4,a5 ) TOKCAT(_ITERATE_FUNC_, ac)(Func, 17, a1,a2,a3,a4,a5 ) IFEMPTY(, _ITERATE_18(Max, Func, ac,a1,a2,a3,a4,a5 ), TOKCAT(_ITERATE_17_, Max))
209 #define _ITERATE_18(Max, Func, ac,a1,a2,a3,a4,a5 ) TOKCAT(_ITERATE_FUNC_, ac)(Func, 18, a1,a2,a3,a4,a5 ) IFEMPTY(, _ITERATE_19(Max, Func, ac,a1,a2,a3,a4,a5 ), TOKCAT(_ITERATE_18_, Max))
210 #define _ITERATE_19(Max, Func, ac,a1,a2,a3,a4,a5 ) TOKCAT(_ITERATE_FUNC_, ac)(Func, 19, a1,a2,a3,a4,a5 ) IFEMPTY(, _ITERATE_20(Max, Func, ac,a1,a2,a3,a4,a5 ), TOKCAT(_ITERATE_19_, Max))
211 #define _ITERATE_20(Max, Func, ac,a1,a2,a3,a4,a5 ) TOKCAT(_ITERATE_FUNC_, ac)(Func, 20, a1,a2,a3,a4,a5 ) IFEMPTY(, _ITERATE_21(Max, Func, ac,a1,a2,a3,a4,a5 ), TOKCAT(_ITERATE_20_, Max))
212 
213 
214 #define _ITERATE_FUNC__0(Func, It, a1,a2,a3,a4,a5 ) Func(It)
215 #define _ITERATE_FUNC__1(Func, It, a1,a2,a3,a4,a5 ) Func(It,a1)
216 #define _ITERATE_FUNC__2(Func, It, a1,a2,a3,a4,a5 ) Func(It,a1,a2)
217 #define _ITERATE_FUNC__3(Func, It, a1,a2,a3,a4,a5 ) Func(It,a1,a2,a3)
218 #define _ITERATE_FUNC__4(Func, It, a1,a2,a3,a4,a5 ) Func(It,a1,a2,a3,a4)
219 #define _ITERATE_FUNC__5(Func, It, a1,a2,a3,a4,a5 ) Func(It,a1,a2,a3,a4,a5)
220 
221 #define _ITERATE__0(Max, Func, ac,a1,a2,a3,a4,a5 ) TOKCAT(_ITERATE_FUNC__, ac)(Func, 0, a1,a2,a3,a4,a5 ) IFEMPTY(, _ITERATE__1(Max, Func, ac,a1,a2,a3,a4,a5 ), TOKCAT(_ITERATE_0_, Max))
222 #define _ITERATE__1(Max, Func, ac,a1,a2,a3,a4,a5 ) TOKCAT(_ITERATE_FUNC__, ac)(Func, 1, a1,a2,a3,a4,a5 ) IFEMPTY(, _ITERATE__2(Max, Func, ac,a1,a2,a3,a4,a5 ), TOKCAT(_ITERATE_1_, Max))
223 #define _ITERATE__2(Max, Func, ac,a1,a2,a3,a4,a5 ) TOKCAT(_ITERATE_FUNC__, ac)(Func, 2, a1,a2,a3,a4,a5 ) IFEMPTY(, _ITERATE__3(Max, Func, ac,a1,a2,a3,a4,a5 ), TOKCAT(_ITERATE_2_, Max))
224 #define _ITERATE__3(Max, Func, ac,a1,a2,a3,a4,a5 ) TOKCAT(_ITERATE_FUNC__, ac)(Func, 3, a1,a2,a3,a4,a5 ) IFEMPTY(, _ITERATE__4(Max, Func, ac,a1,a2,a3,a4,a5 ), TOKCAT(_ITERATE_3_, Max))
225 #define _ITERATE__4(Max, Func, ac,a1,a2,a3,a4,a5 ) TOKCAT(_ITERATE_FUNC__, ac)(Func, 4, a1,a2,a3,a4,a5 ) IFEMPTY(, _ITERATE__5(Max, Func, ac,a1,a2,a3,a4,a5 ), TOKCAT(_ITERATE_4_, Max))
226 #define _ITERATE__5(Max, Func, ac,a1,a2,a3,a4,a5 ) TOKCAT(_ITERATE_FUNC__, ac)(Func, 5, a1,a2,a3,a4,a5 ) IFEMPTY(, _ITERATE__6(Max, Func, ac,a1,a2,a3,a4,a5 ), TOKCAT(_ITERATE_5_, Max))
227 #define _ITERATE__6(Max, Func, ac,a1,a2,a3,a4,a5 ) TOKCAT(_ITERATE_FUNC__, ac)(Func, 6, a1,a2,a3,a4,a5 ) IFEMPTY(, _ITERATE__7(Max, Func, ac,a1,a2,a3,a4,a5 ), TOKCAT(_ITERATE_6_, Max))
228 #define _ITERATE__7(Max, Func, ac,a1,a2,a3,a4,a5 ) TOKCAT(_ITERATE_FUNC__, ac)(Func, 7, a1,a2,a3,a4,a5 ) IFEMPTY(, _ITERATE__8(Max, Func, ac,a1,a2,a3,a4,a5 ), TOKCAT(_ITERATE_7_, Max))
229 #define _ITERATE__8(Max, Func, ac,a1,a2,a3,a4,a5 ) TOKCAT(_ITERATE_FUNC__, ac)(Func, 8, a1,a2,a3,a4,a5 ) IFEMPTY(, _ITERATE__9(Max, Func, ac,a1,a2,a3,a4,a5 ), TOKCAT(_ITERATE_8_, Max))
230 #define _ITERATE__9(Max, Func, ac,a1,a2,a3,a4,a5 ) TOKCAT(_ITERATE_FUNC__, ac)(Func, 9, a1,a2,a3,a4,a5 ) IFEMPTY(, _ITERATE__10(Max, Func, ac,a1,a2,a3,a4,a5 ), TOKCAT(_ITERATE_9_, Max))
231 #define _ITERATE__10(Max, Func, ac,a1,a2,a3,a4,a5 ) TOKCAT(_ITERATE_FUNC__, ac)(Func, 10, a1,a2,a3,a4,a5 ) IFEMPTY(, _ITERATE__11(Max, Func, ac,a1,a2,a3,a4,a5 ), TOKCAT(_ITERATE_10_, Max))
232 #define _ITERATE__11(Max, Func, ac,a1,a2,a3,a4,a5 ) TOKCAT(_ITERATE_FUNC__, ac)(Func, 11, a1,a2,a3,a4,a5 ) IFEMPTY(, _ITERATE__12(Max, Func, ac,a1,a2,a3,a4,a5 ), TOKCAT(_ITERATE_11_, Max))
233 #define _ITERATE__12(Max, Func, ac,a1,a2,a3,a4,a5 ) TOKCAT(_ITERATE_FUNC__, ac)(Func, 12, a1,a2,a3,a4,a5 ) IFEMPTY(, _ITERATE__13(Max, Func, ac,a1,a2,a3,a4,a5 ), TOKCAT(_ITERATE_12_, Max))
234 #define _ITERATE__13(Max, Func, ac,a1,a2,a3,a4,a5 ) TOKCAT(_ITERATE_FUNC__, ac)(Func, 13, a1,a2,a3,a4,a5 ) IFEMPTY(, _ITERATE__14(Max, Func, ac,a1,a2,a3,a4,a5 ), TOKCAT(_ITERATE_13_, Max))
235 #define _ITERATE__14(Max, Func, ac,a1,a2,a3,a4,a5 ) TOKCAT(_ITERATE_FUNC__, ac)(Func, 14, a1,a2,a3,a4,a5 ) IFEMPTY(, _ITERATE__15(Max, Func, ac,a1,a2,a3,a4,a5 ), TOKCAT(_ITERATE_14_, Max))
236 #define _ITERATE__15(Max, Func, ac,a1,a2,a3,a4,a5 ) TOKCAT(_ITERATE_FUNC__, ac)(Func, 15, a1,a2,a3,a4,a5 ) IFEMPTY(, _ITERATE__16(Max, Func, ac,a1,a2,a3,a4,a5 ), TOKCAT(_ITERATE_15_, Max))
237 #define _ITERATE__16(Max, Func, ac,a1,a2,a3,a4,a5 ) TOKCAT(_ITERATE_FUNC__, ac)(Func, 16, a1,a2,a3,a4,a5 ) IFEMPTY(, _ITERATE__17(Max, Func, ac,a1,a2,a3,a4,a5 ), TOKCAT(_ITERATE_16_, Max))
238 #define _ITERATE__17(Max, Func, ac,a1,a2,a3,a4,a5 ) TOKCAT(_ITERATE_FUNC__, ac)(Func, 17, a1,a2,a3,a4,a5 ) IFEMPTY(, _ITERATE__18(Max, Func, ac,a1,a2,a3,a4,a5 ), TOKCAT(_ITERATE_17_, Max))
239 #define _ITERATE__18(Max, Func, ac,a1,a2,a3,a4,a5 ) TOKCAT(_ITERATE_FUNC__, ac)(Func, 18, a1,a2,a3,a4,a5 ) IFEMPTY(, _ITERATE__19(Max, Func, ac,a1,a2,a3,a4,a5 ), TOKCAT(_ITERATE_18_, Max))
240 #define _ITERATE__19(Max, Func, ac,a1,a2,a3,a4,a5 ) TOKCAT(_ITERATE_FUNC__, ac)(Func, 19, a1,a2,a3,a4,a5 ) IFEMPTY(, _ITERATE__20(Max, Func, ac,a1,a2,a3,a4,a5 ), TOKCAT(_ITERATE_19_, Max))
241 #define _ITERATE__20(Max, Func, ac,a1,a2,a3,a4,a5 ) TOKCAT(_ITERATE_FUNC__, ac)(Func, 20, a1,a2,a3,a4,a5 ) IFEMPTY(, _ITERATE__21(Max, Func, ac,a1,a2,a3,a4,a5 ), TOKCAT(_ITERATE_20_, Max))
242 
243 
244 #define _ITERATE_FUNC___0(Func, It, a1,a2,a3,a4,a5 ) Func(It)
245 #define _ITERATE_FUNC___1(Func, It, a1,a2,a3,a4,a5 ) Func(It,a1)
246 #define _ITERATE_FUNC___2(Func, It, a1,a2,a3,a4,a5 ) Func(It,a1,a2)
247 #define _ITERATE_FUNC___3(Func, It, a1,a2,a3,a4,a5 ) Func(It,a1,a2,a3)
248 #define _ITERATE_FUNC___4(Func, It, a1,a2,a3,a4,a5 ) Func(It,a1,a2,a3,a4)
249 #define _ITERATE_FUNC___5(Func, It, a1,a2,a3,a4,a5 ) Func(It,a1,a2,a3,a4,a5)
250 
251 #define _ITERATE___0(Max, Func, ac,a1,a2,a3,a4,a5 ) TOKCAT(_ITERATE_FUNC___, ac)(Func, 0, a1,a2,a3,a4,a5 ) IFEMPTY(, _ITERATE___1(Max, Func, ac,a1,a2,a3,a4,a5 ), TOKCAT(_ITERATE_0_, Max))
252 #define _ITERATE___1(Max, Func, ac,a1,a2,a3,a4,a5 ) TOKCAT(_ITERATE_FUNC___, ac)(Func, 1, a1,a2,a3,a4,a5 ) IFEMPTY(, _ITERATE___2(Max, Func, ac,a1,a2,a3,a4,a5 ), TOKCAT(_ITERATE_1_, Max))
253 #define _ITERATE___2(Max, Func, ac,a1,a2,a3,a4,a5 ) TOKCAT(_ITERATE_FUNC___, ac)(Func, 2, a1,a2,a3,a4,a5 ) IFEMPTY(, _ITERATE___3(Max, Func, ac,a1,a2,a3,a4,a5 ), TOKCAT(_ITERATE_2_, Max))
254 #define _ITERATE___3(Max, Func, ac,a1,a2,a3,a4,a5 ) TOKCAT(_ITERATE_FUNC___, ac)(Func, 3, a1,a2,a3,a4,a5 ) IFEMPTY(, _ITERATE___4(Max, Func, ac,a1,a2,a3,a4,a5 ), TOKCAT(_ITERATE_3_, Max))
255 #define _ITERATE___4(Max, Func, ac,a1,a2,a3,a4,a5 ) TOKCAT(_ITERATE_FUNC___, ac)(Func, 4, a1,a2,a3,a4,a5 ) IFEMPTY(, _ITERATE___5(Max, Func, ac,a1,a2,a3,a4,a5 ), TOKCAT(_ITERATE_4_, Max))
256 #define _ITERATE___5(Max, Func, ac,a1,a2,a3,a4,a5 ) TOKCAT(_ITERATE_FUNC___, ac)(Func, 5, a1,a2,a3,a4,a5 ) IFEMPTY(, _ITERATE___6(Max, Func, ac,a1,a2,a3,a4,a5 ), TOKCAT(_ITERATE_5_, Max))
257 #define _ITERATE___6(Max, Func, ac,a1,a2,a3,a4,a5 ) TOKCAT(_ITERATE_FUNC___, ac)(Func, 6, a1,a2,a3,a4,a5 ) IFEMPTY(, _ITERATE___7(Max, Func, ac,a1,a2,a3,a4,a5 ), TOKCAT(_ITERATE_6_, Max))
258 #define _ITERATE___7(Max, Func, ac,a1,a2,a3,a4,a5 ) TOKCAT(_ITERATE_FUNC___, ac)(Func, 7, a1,a2,a3,a4,a5 ) IFEMPTY(, _ITERATE___8(Max, Func, ac,a1,a2,a3,a4,a5 ), TOKCAT(_ITERATE_7_, Max))
259 #define _ITERATE___8(Max, Func, ac,a1,a2,a3,a4,a5 ) TOKCAT(_ITERATE_FUNC___, ac)(Func, 8, a1,a2,a3,a4,a5 ) IFEMPTY(, _ITERATE___9(Max, Func, ac,a1,a2,a3,a4,a5 ), TOKCAT(_ITERATE_8_, Max))
260 #define _ITERATE___9(Max, Func, ac,a1,a2,a3,a4,a5 ) TOKCAT(_ITERATE_FUNC___, ac)(Func, 9, a1,a2,a3,a4,a5 ) IFEMPTY(, _ITERATE___10(Max, Func, ac,a1,a2,a3,a4,a5 ), TOKCAT(_ITERATE_9_, Max))
261 #define _ITERATE___10(Max, Func, ac,a1,a2,a3,a4,a5 ) TOKCAT(_ITERATE_FUNC___, ac)(Func, 10, a1,a2,a3,a4,a5 ) IFEMPTY(, _ITERATE___11(Max, Func, ac,a1,a2,a3,a4,a5 ), TOKCAT(_ITERATE_10_, Max))
262 #define _ITERATE___11(Max, Func, ac,a1,a2,a3,a4,a5 ) TOKCAT(_ITERATE_FUNC___, ac)(Func, 11, a1,a2,a3,a4,a5 ) IFEMPTY(, _ITERATE___12(Max, Func, ac,a1,a2,a3,a4,a5 ), TOKCAT(_ITERATE_11_, Max))
263 #define _ITERATE___12(Max, Func, ac,a1,a2,a3,a4,a5 ) TOKCAT(_ITERATE_FUNC___, ac)(Func, 12, a1,a2,a3,a4,a5 ) IFEMPTY(, _ITERATE___13(Max, Func, ac,a1,a2,a3,a4,a5 ), TOKCAT(_ITERATE_12_, Max))
264 #define _ITERATE___13(Max, Func, ac,a1,a2,a3,a4,a5 ) TOKCAT(_ITERATE_FUNC___, ac)(Func, 13, a1,a2,a3,a4,a5 ) IFEMPTY(, _ITERATE___14(Max, Func, ac,a1,a2,a3,a4,a5 ), TOKCAT(_ITERATE_13_, Max))
265 #define _ITERATE___14(Max, Func, ac,a1,a2,a3,a4,a5 ) TOKCAT(_ITERATE_FUNC___, ac)(Func, 14, a1,a2,a3,a4,a5 ) IFEMPTY(, _ITERATE___15(Max, Func, ac,a1,a2,a3,a4,a5 ), TOKCAT(_ITERATE_14_, Max))
266 #define _ITERATE___15(Max, Func, ac,a1,a2,a3,a4,a5 ) TOKCAT(_ITERATE_FUNC___, ac)(Func, 15, a1,a2,a3,a4,a5 ) IFEMPTY(, _ITERATE___16(Max, Func, ac,a1,a2,a3,a4,a5 ), TOKCAT(_ITERATE_15_, Max))
267 #define _ITERATE___16(Max, Func, ac,a1,a2,a3,a4,a5 ) TOKCAT(_ITERATE_FUNC___, ac)(Func, 16, a1,a2,a3,a4,a5 ) IFEMPTY(, _ITERATE___17(Max, Func, ac,a1,a2,a3,a4,a5 ), TOKCAT(_ITERATE_16_, Max))
268 #define _ITERATE___17(Max, Func, ac,a1,a2,a3,a4,a5 ) TOKCAT(_ITERATE_FUNC___, ac)(Func, 17, a1,a2,a3,a4,a5 ) IFEMPTY(, _ITERATE___18(Max, Func, ac,a1,a2,a3,a4,a5 ), TOKCAT(_ITERATE_17_, Max))
269 #define _ITERATE___18(Max, Func, ac,a1,a2,a3,a4,a5 ) TOKCAT(_ITERATE_FUNC___, ac)(Func, 18, a1,a2,a3,a4,a5 ) IFEMPTY(, _ITERATE___19(Max, Func, ac,a1,a2,a3,a4,a5 ), TOKCAT(_ITERATE_18_, Max))
270 #define _ITERATE___19(Max, Func, ac,a1,a2,a3,a4,a5 ) TOKCAT(_ITERATE_FUNC___, ac)(Func, 19, a1,a2,a3,a4,a5 ) IFEMPTY(, _ITERATE___20(Max, Func, ac,a1,a2,a3,a4,a5 ), TOKCAT(_ITERATE_19_, Max))
271 #define _ITERATE___20(Max, Func, ac,a1,a2,a3,a4,a5 ) TOKCAT(_ITERATE_FUNC___, ac)(Func, 20, a1,a2,a3,a4,a5 ) IFEMPTY(, _ITERATE___21(Max, Func, ac,a1,a2,a3,a4,a5 ), TOKCAT(_ITERATE_20_, Max))
272 
273 #define _INC_0 1
274 #define _INC_1 2
275 #define _INC_2 3
276 #define _INC_3 4
277 #define _INC_4 5
278 #define _INC_5 6
279 #define _INC_6 7
280 #define _INC_7 8
281 #define _INC_8 9
282 #define _INC_9 10
283 #define _INC_10 11
284 #define _INC_11 12
285 #define _INC_12 13
286 #define _INC_13 14
287 #define _INC_14 15
288 #define _INC_15 16
289 #define _INC_16 17
290 #define _INC_17 18
291 #define _INC_18 19
292 #define _INC_19 20
293 
294 #define _ADD_0(Lhs, Rhs) IFEQUAL(Rhs, 0, Lhs, _ADD_1(TOKCAT(_INC_,Lhs),Rhs))
295 #define _ADD_1(Lhs, Rhs) IFEQUAL(Rhs, 1, Lhs, _ADD_2(TOKCAT(_INC_,Lhs),Rhs))
296 #define _ADD_2(Lhs, Rhs) IFEQUAL(Rhs, 2, Lhs, _ADD_3(TOKCAT(_INC_,Lhs),Rhs))
297 #define _ADD_3(Lhs, Rhs) IFEQUAL(Rhs, 3, Lhs, _ADD_4(TOKCAT(_INC_,Lhs),Rhs))
298 #define _ADD_4(Lhs, Rhs) IFEQUAL(Rhs, 4, Lhs, _ADD_5(TOKCAT(_INC_,Lhs),Rhs))
299 #define _ADD_5(Lhs, Rhs) IFEQUAL(Rhs, 5, Lhs, _ADD_6(TOKCAT(_INC_,Lhs),Rhs))
300 #define _ADD_6(Lhs, Rhs) IFEQUAL(Rhs, 6, Lhs, _ADD_7(TOKCAT(_INC_,Lhs),Rhs))
301 #define _ADD_7(Lhs, Rhs) IFEQUAL(Rhs, 7, Lhs, _ADD_8(TOKCAT(_INC_,Lhs),Rhs))
302 #define _ADD_8(Lhs, Rhs) IFEQUAL(Rhs, 8, Lhs, _ADD_9(TOKCAT(_INC_,Lhs),Rhs))
303 #define _ADD_9(Lhs, Rhs) IFEQUAL(Rhs, 9, Lhs, _ADD_10(TOKCAT(_INC_,Lhs),Rhs))
304 #define _ADD_10(Lhs, Rhs) IFEQUAL(Rhs, 10, Lhs, _ADD_11(TOKCAT(_INC_,Lhs),Rhs))
305 #define _ADD_11(Lhs, Rhs) IFEQUAL(Rhs, 11, Lhs, _ADD_12(TOKCAT(_INC_,Lhs),Rhs))
306 #define _ADD_12(Lhs, Rhs) IFEQUAL(Rhs, 12, Lhs, _ADD_13(TOKCAT(_INC_,Lhs),Rhs))
307 #define _ADD_13(Lhs, Rhs) IFEQUAL(Rhs, 13, Lhs, _ADD_14(TOKCAT(_INC_,Lhs),Rhs))
308 #define _ADD_14(Lhs, Rhs) IFEQUAL(Rhs, 14, Lhs, _ADD_15(TOKCAT(_INC_,Lhs),Rhs))
309 #define _ADD_15(Lhs, Rhs) IFEQUAL(Rhs, 15, Lhs, _ADD_16(TOKCAT(_INC_,Lhs),Rhs))
310 #define _ADD_16(Lhs, Rhs) IFEQUAL(Rhs, 16, Lhs, _ADD_17(TOKCAT(_INC_,Lhs),Rhs))
311 #define _ADD_17(Lhs, Rhs) IFEQUAL(Rhs, 17, Lhs, _ADD_18(TOKCAT(_INC_,Lhs),Rhs))
312 #define _ADD_18(Lhs, Rhs) IFEQUAL(Rhs, 18, Lhs, _ADD_19(TOKCAT(_INC_,Lhs),Rhs))
313 #define _ADD_19(Lhs, Rhs) IFEQUAL(Rhs, 19, Lhs, _ADD_20(TOKCAT(_INC_,Lhs),Rhs))
314 #define _ADD_20(Lhs, Rhs) IFEQUAL(Rhs, 20, Lhs, _ADD_21(TOKCAT(_INC_,Lhs),Rhs))
315 
316 #define _DEC_1 0
317 #define _DEC_2 1
318 #define _DEC_3 2
319 #define _DEC_4 3
320 #define _DEC_5 4
321 #define _DEC_6 5
322 #define _DEC_7 6
323 #define _DEC_8 7
324 #define _DEC_9 8
325 #define _DEC_10 9
326 #define _DEC_11 10
327 #define _DEC_12 11
328 #define _DEC_13 12
329 #define _DEC_14 13
330 #define _DEC_15 14
331 #define _DEC_16 15
332 #define _DEC_17 16
333 #define _DEC_18 17
334 #define _DEC_19 18
335 #define _DEC_20 19
336 
337 #define _SUBTRACT_0(Lhs, Rhs) IFEQUAL(Lhs, Rhs, 0, _SUBTRACT_1(TOKCAT(_DEC_,Lhs),Rhs))
338 #define _SUBTRACT_1(Lhs, Rhs) IFEQUAL(Lhs, Rhs, 1, _SUBTRACT_2(TOKCAT(_DEC_,Lhs),Rhs))
339 #define _SUBTRACT_2(Lhs, Rhs) IFEQUAL(Lhs, Rhs, 2, _SUBTRACT_3(TOKCAT(_DEC_,Lhs),Rhs))
340 #define _SUBTRACT_3(Lhs, Rhs) IFEQUAL(Lhs, Rhs, 3, _SUBTRACT_4(TOKCAT(_DEC_,Lhs),Rhs))
341 #define _SUBTRACT_4(Lhs, Rhs) IFEQUAL(Lhs, Rhs, 4, _SUBTRACT_5(TOKCAT(_DEC_,Lhs),Rhs))
342 #define _SUBTRACT_5(Lhs, Rhs) IFEQUAL(Lhs, Rhs, 5, _SUBTRACT_6(TOKCAT(_DEC_,Lhs),Rhs))
343 #define _SUBTRACT_6(Lhs, Rhs) IFEQUAL(Lhs, Rhs, 6, _SUBTRACT_7(TOKCAT(_DEC_,Lhs),Rhs))
344 #define _SUBTRACT_7(Lhs, Rhs) IFEQUAL(Lhs, Rhs, 7, _SUBTRACT_8(TOKCAT(_DEC_,Lhs),Rhs))
345 #define _SUBTRACT_8(Lhs, Rhs) IFEQUAL(Lhs, Rhs, 8, _SUBTRACT_9(TOKCAT(_DEC_,Lhs),Rhs))
346 #define _SUBTRACT_9(Lhs, Rhs) IFEQUAL(Lhs, Rhs, 9, _SUBTRACT_10(TOKCAT(_DEC_,Lhs),Rhs))
347 #define _SUBTRACT_10(Lhs, Rhs) IFEQUAL(Lhs, Rhs, 10, _SUBTRACT_11(TOKCAT(_DEC_,Lhs),Rhs))
348 #define _SUBTRACT_11(Lhs, Rhs) IFEQUAL(Lhs, Rhs, 11, _SUBTRACT_12(TOKCAT(_DEC_,Lhs),Rhs))
349 #define _SUBTRACT_12(Lhs, Rhs) IFEQUAL(Lhs, Rhs, 12, _SUBTRACT_13(TOKCAT(_DEC_,Lhs),Rhs))
350 #define _SUBTRACT_13(Lhs, Rhs) IFEQUAL(Lhs, Rhs, 13, _SUBTRACT_14(TOKCAT(_DEC_,Lhs),Rhs))
351 #define _SUBTRACT_14(Lhs, Rhs) IFEQUAL(Lhs, Rhs, 14, _SUBTRACT_15(TOKCAT(_DEC_,Lhs),Rhs))
352 #define _SUBTRACT_15(Lhs, Rhs) IFEQUAL(Lhs, Rhs, 15, _SUBTRACT_16(TOKCAT(_DEC_,Lhs),Rhs))
353 #define _SUBTRACT_16(Lhs, Rhs) IFEQUAL(Lhs, Rhs, 16, _SUBTRACT_17(TOKCAT(_DEC_,Lhs),Rhs))
354 #define _SUBTRACT_17(Lhs, Rhs) IFEQUAL(Lhs, Rhs, 17, _SUBTRACT_18(TOKCAT(_DEC_,Lhs),Rhs))
355 #define _SUBTRACT_18(Lhs, Rhs) IFEQUAL(Lhs, Rhs, 18, _SUBTRACT_19(TOKCAT(_DEC_,Lhs),Rhs))
356 #define _SUBTRACT_19(Lhs, Rhs) IFEQUAL(Lhs, Rhs, 19, _SUBTRACT_20(TOKCAT(_DEC_,Lhs),Rhs))
357 #define _SUBTRACT_20(Lhs, Rhs) IFEQUAL(Lhs, Rhs, 20, _SUBTRACT_21(TOKCAT(_DEC_,Lhs),Rhs))
358 
359 
360 }
Global Honeycomb namespace.