proxsuite 0.6.7
The Advanced Proximal Optimization Toolbox
Loading...
Searching...
No Matches
preprocessor.hpp
Go to the documentation of this file.
1#ifndef VEG_PREPROCESSOR_HPP_U2V3WRWYS
2#define VEG_PREPROCESSOR_HPP_U2V3WRWYS
3
4// clang-format off
5#define __VEG_IMPL_PP_COUNT(Arg_0, Arg_1, Arg_2, Arg_3, Arg_4, Arg_5, Arg_6, Arg_7, Arg_8, Arg_9, Arg_10, Arg_11, Arg_12, Arg_13, Arg_14, Arg_15, Arg_16, Arg_17, Arg_18, Arg_19, Arg_20, Arg_21, Arg_22, Arg_23, Arg_24, Arg_25, Arg_26, Arg_27, Arg_28, Arg_29, Arg_30, Arg_31, N, ...) N
6
7#define __VEG_IMPL_PP_IS_1_1 1
8#define __VEG_IMPL_PP_IS_1_2 0
9#define __VEG_IMPL_PP_IS_1_3 0
10#define __VEG_IMPL_PP_IS_1_4 0
11#define __VEG_IMPL_PP_IS_1_5 0
12#define __VEG_IMPL_PP_IS_1_6 0
13#define __VEG_IMPL_PP_IS_1_7 0
14#define __VEG_IMPL_PP_IS_1_8 0
15#define __VEG_IMPL_PP_IS_1_9 0
16#define __VEG_IMPL_PP_IS_1_10 0
17#define __VEG_IMPL_PP_IS_1_11 0
18#define __VEG_IMPL_PP_IS_1_12 0
19#define __VEG_IMPL_PP_IS_1_13 0
20#define __VEG_IMPL_PP_IS_1_14 0
21#define __VEG_IMPL_PP_IS_1_15 0
22#define __VEG_IMPL_PP_IS_1_16 0
23#define __VEG_IMPL_PP_IS_1_17 0
24#define __VEG_IMPL_PP_IS_1_18 0
25#define __VEG_IMPL_PP_IS_1_19 0
26#define __VEG_IMPL_PP_IS_1_20 0
27#define __VEG_IMPL_PP_IS_1_21 0
28#define __VEG_IMPL_PP_IS_1_22 0
29#define __VEG_IMPL_PP_IS_1_23 0
30#define __VEG_IMPL_PP_IS_1_24 0
31#define __VEG_IMPL_PP_IS_1_25 0
32#define __VEG_IMPL_PP_IS_1_26 0
33#define __VEG_IMPL_PP_IS_1_27 0
34#define __VEG_IMPL_PP_IS_1_28 0
35#define __VEG_IMPL_PP_IS_1_29 0
36#define __VEG_IMPL_PP_IS_1_30 0
37#define __VEG_IMPL_PP_IS_1_31 0
38#define __VEG_IMPL_PP_IS_1_32 0
39#define __VEG_IMPL_PP_IS_1_33 0
40
41#define __VEG_IMPL_PP_DEC_1 0
42#define __VEG_IMPL_PP_DEC_2 1
43#define __VEG_IMPL_PP_DEC_3 2
44#define __VEG_IMPL_PP_DEC_4 3
45#define __VEG_IMPL_PP_DEC_5 4
46#define __VEG_IMPL_PP_DEC_6 5
47#define __VEG_IMPL_PP_DEC_7 6
48#define __VEG_IMPL_PP_DEC_8 7
49#define __VEG_IMPL_PP_DEC_9 8
50#define __VEG_IMPL_PP_DEC_10 9
51#define __VEG_IMPL_PP_DEC_11 10
52#define __VEG_IMPL_PP_DEC_12 11
53#define __VEG_IMPL_PP_DEC_13 12
54#define __VEG_IMPL_PP_DEC_14 13
55#define __VEG_IMPL_PP_DEC_15 14
56#define __VEG_IMPL_PP_DEC_16 15
57#define __VEG_IMPL_PP_DEC_17 16
58#define __VEG_IMPL_PP_DEC_18 17
59#define __VEG_IMPL_PP_DEC_19 18
60#define __VEG_IMPL_PP_DEC_20 19
61#define __VEG_IMPL_PP_DEC_21 20
62#define __VEG_IMPL_PP_DEC_22 21
63#define __VEG_IMPL_PP_DEC_23 22
64#define __VEG_IMPL_PP_DEC_24 23
65#define __VEG_IMPL_PP_DEC_25 24
66#define __VEG_IMPL_PP_DEC_26 25
67#define __VEG_IMPL_PP_DEC_27 26
68#define __VEG_IMPL_PP_DEC_28 27
69#define __VEG_IMPL_PP_DEC_29 28
70#define __VEG_IMPL_PP_DEC_30 29
71#define __VEG_IMPL_PP_DEC_31 30
72#define __VEG_IMPL_PP_DEC_32 31
73#define __VEG_IMPL_PP_DEC_33 32
74
75#define __VEG_IMPL_PP_INC_0 1
76#define __VEG_IMPL_PP_INC_1 2
77#define __VEG_IMPL_PP_INC_2 3
78#define __VEG_IMPL_PP_INC_3 4
79#define __VEG_IMPL_PP_INC_4 5
80#define __VEG_IMPL_PP_INC_5 6
81#define __VEG_IMPL_PP_INC_6 7
82#define __VEG_IMPL_PP_INC_7 8
83#define __VEG_IMPL_PP_INC_8 9
84#define __VEG_IMPL_PP_INC_9 10
85#define __VEG_IMPL_PP_INC_10 11
86#define __VEG_IMPL_PP_INC_11 12
87#define __VEG_IMPL_PP_INC_12 13
88#define __VEG_IMPL_PP_INC_13 14
89#define __VEG_IMPL_PP_INC_14 15
90#define __VEG_IMPL_PP_INC_15 16
91#define __VEG_IMPL_PP_INC_16 17
92#define __VEG_IMPL_PP_INC_17 18
93#define __VEG_IMPL_PP_INC_18 19
94#define __VEG_IMPL_PP_INC_19 20
95#define __VEG_IMPL_PP_INC_20 21
96#define __VEG_IMPL_PP_INC_21 22
97#define __VEG_IMPL_PP_INC_22 23
98#define __VEG_IMPL_PP_INC_23 24
99#define __VEG_IMPL_PP_INC_24 25
100#define __VEG_IMPL_PP_INC_25 26
101#define __VEG_IMPL_PP_INC_26 27
102#define __VEG_IMPL_PP_INC_27 28
103#define __VEG_IMPL_PP_INC_28 29
104#define __VEG_IMPL_PP_INC_29 30
105#define __VEG_IMPL_PP_INC_30 31
106#define __VEG_IMPL_PP_INC_31 32
107#define __VEG_IMPL_PP_INC_32 33
108
109#define __VEG_IMPL_PP_DEC_I(X) __VEG_IMPL_PP_DEC_##X
110#define __VEG_IMPL_PP_DEC(X) __VEG_IMPL_PP_DEC_I(X)
111#define __VEG_IMPL_PP_INC_I(X) __VEG_IMPL_PP_INC_##X
112#define __VEG_IMPL_PP_INC(X) __VEG_IMPL_PP_INC_I(X)
113#define __VEG_IMPL_PP_IS_1_I(X) __VEG_IMPL_PP_IS_1_##X
114#define __VEG_IMPL_PP_IS_1(X) __VEG_IMPL_PP_IS_1_I(X)
115
116#define __VEG_IMPL_PP_COMMA_IF_NOT_0_1
117#define __VEG_IMPL_PP_COMMA_IF_NOT_0_0 ,
118#define __VEG_PP_COMMA_IF_NOT_0(X) __VEG_PP_CAT2(__VEG_IMPL_PP_COMMA_IF_NOT_0_, __VEG_PP_IS_0(X))
119
120#define __VEG_PP_IS_1(X) __VEG_IMPL_PP_IS_1_I(X)
121#define __VEG_PP_IS_0(X) __VEG_PP_IS_1(__VEG_IMPL_PP_INC_I(X))
122
123#define __VEG_PP_ID(X) X
124
125#define __VEG_IMPL_PP_VARIADIC_SIZE(...) __VEG_PP_ID(__VEG_IMPL_PP_COUNT(__VA_ARGS__, 32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0))
126
127#define __VEG_IMPL_PP_MAKE_TUPLE0 ()
128#define __VEG_IMPL_PP_MAKE_TUPLE1 (0)
129#define __VEG_IMPL_PP_MAKE_TUPLE2 (0, 1)
130#define __VEG_IMPL_PP_MAKE_TUPLE3 (0, 1, 2)
131#define __VEG_IMPL_PP_MAKE_TUPLE4 (0, 1, 2, 3)
132#define __VEG_IMPL_PP_MAKE_TUPLE5 (0, 1, 2, 3, 4)
133#define __VEG_IMPL_PP_MAKE_TUPLE6 (0, 1, 2, 3, 4, 5)
134#define __VEG_IMPL_PP_MAKE_TUPLE7 (0, 1, 2, 3, 4, 5, 6)
135#define __VEG_IMPL_PP_MAKE_TUPLE8 (0, 1, 2, 3, 4, 5, 6, 7)
136#define __VEG_IMPL_PP_MAKE_TUPLE9 (0, 1, 2, 3, 4, 5, 6, 7, 8)
137#define __VEG_IMPL_PP_MAKE_TUPLE10 (0, 1, 2, 3, 4, 5, 6, 7, 8, 9)
138#define __VEG_IMPL_PP_MAKE_TUPLE11 (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
139#define __VEG_IMPL_PP_MAKE_TUPLE12 (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11)
140#define __VEG_IMPL_PP_MAKE_TUPLE13 (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12)
141#define __VEG_IMPL_PP_MAKE_TUPLE14 (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13)
142#define __VEG_IMPL_PP_MAKE_TUPLE15 (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14)
143#define __VEG_IMPL_PP_MAKE_TUPLE16 (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15)
144#define __VEG_IMPL_PP_MAKE_TUPLE17 (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16)
145#define __VEG_IMPL_PP_MAKE_TUPLE18 (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17)
146#define __VEG_IMPL_PP_MAKE_TUPLE19 (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18)
147#define __VEG_IMPL_PP_MAKE_TUPLE20 (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19)
148#define __VEG_IMPL_PP_MAKE_TUPLE21 (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20)
149#define __VEG_IMPL_PP_MAKE_TUPLE22 (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21)
150#define __VEG_IMPL_PP_MAKE_TUPLE23 (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22)
151#define __VEG_IMPL_PP_MAKE_TUPLE24 (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23)
152#define __VEG_IMPL_PP_MAKE_TUPLE25 (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24)
153#define __VEG_IMPL_PP_MAKE_TUPLE26 (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25)
154#define __VEG_IMPL_PP_MAKE_TUPLE27 (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26)
155#define __VEG_IMPL_PP_MAKE_TUPLE28 (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27)
156#define __VEG_IMPL_PP_MAKE_TUPLE29 (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28)
157#define __VEG_IMPL_PP_MAKE_TUPLE30 (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29)
158#define __VEG_IMPL_PP_MAKE_TUPLE31 (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30)
159#define __VEG_IMPL_PP_MAKE_TUPLE32 (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31)
160// clang-format on
161
162#define __VEG_IMPL_PP_CAT(A, ...) A##__VA_ARGS__
163#define __VEG_IMPL_PP_CAT2(A, ...) A##__VA_ARGS__
164#define __VEG_IMPL_PP_CAT3(A, ...) A##__VA_ARGS__
165
166#define __VEG_IMPL_PP_CONSUME(X)
167
168#define __VEG_IMPL_PP_SEQ_HEAD_1(X)
169#define __VEG_IMPL_PP_SEQ_HEAD_0(X) X __VEG_IMPL_PP_SEQ_HEAD_1(
170
171#define __VEG_IMPL_PP_HEAD_0(arg, ...) arg
172#define __VEG_IMPL_PP_TAIL_0(arg, ...) __VA_ARGS__
173#define __VEG_IMPL_PP_HEAD_1(arg) arg
174#define __VEG_IMPL_PP_TAIL_1(arg)
175
176#define __VEG_IMPL_PP_STRINGIZE(...) #__VA_ARGS__
177
178#define __VEG_IMPL_PP_REMOVE_PAREN1(...) __VEG_IMPL_PP_REMOVE_PAREN1 __VA_ARGS__
179#define __VEG_IMPL_PP_REMOVE_PAREN2(...) \
180 __VEG_PP_CAT(__VEG_IMPL_PP, __VA_ARGS__)
181#define __VEG_IMPL_PP__VEG_IMPL_PP_REMOVE_PAREN1
182
183#define __VEG_IMPL_PP_REMOVE_PAREN11(...) \
184 __VEG_IMPL_PP_REMOVE_PAREN11 __VA_ARGS__
185#define __VEG_IMPL_PP_REMOVE_PAREN21(...) \
186 __VEG_PP_CAT(__VEG_IMPL_PP, __VA_ARGS__)
187#define __VEG_IMPL_PP__VEG_IMPL_PP_REMOVE_PAREN11
188
189#define __VEG_PP_MAKE_TUPLE(N) __VEG_PP_CAT2(__VEG_IMPL_PP_MAKE_TUPLE, N)
190
191#define __VEG_IMPL_PP_TUPLE_FOR_EACH_1(Macro, Data, Tuple) \
192 Macro(Data, __VEG_PP_REMOVE_PAREN1(Tuple))
193#define __VEG_IMPL_PP_TUPLE_FOR_EACH_2(Macro, Data, Tuple) \
194 Macro(Data, __VEG_PP_HEAD Tuple) \
195 __VEG_IMPL_PP_TUPLE_FOR_EACH_1(Macro, Data, (__VEG_PP_TAIL Tuple))
196#define __VEG_IMPL_PP_TUPLE_FOR_EACH_3(Macro, Data, Tuple) \
197 Macro(Data, __VEG_PP_HEAD Tuple) \
198 __VEG_IMPL_PP_TUPLE_FOR_EACH_2(Macro, Data, (__VEG_PP_TAIL Tuple))
199#define __VEG_IMPL_PP_TUPLE_FOR_EACH_4(Macro, Data, Tuple) \
200 Macro(Data, __VEG_PP_HEAD Tuple) \
201 __VEG_IMPL_PP_TUPLE_FOR_EACH_3(Macro, Data, (__VEG_PP_TAIL Tuple))
202#define __VEG_IMPL_PP_TUPLE_FOR_EACH_5(Macro, Data, Tuple) \
203 Macro(Data, __VEG_PP_HEAD Tuple) \
204 __VEG_IMPL_PP_TUPLE_FOR_EACH_4(Macro, Data, (__VEG_PP_TAIL Tuple))
205#define __VEG_IMPL_PP_TUPLE_FOR_EACH_6(Macro, Data, Tuple) \
206 Macro(Data, __VEG_PP_HEAD Tuple) \
207 __VEG_IMPL_PP_TUPLE_FOR_EACH_5(Macro, Data, (__VEG_PP_TAIL Tuple))
208#define __VEG_IMPL_PP_TUPLE_FOR_EACH_7(Macro, Data, Tuple) \
209 Macro(Data, __VEG_PP_HEAD Tuple) \
210 __VEG_IMPL_PP_TUPLE_FOR_EACH_6(Macro, Data, (__VEG_PP_TAIL Tuple))
211#define __VEG_IMPL_PP_TUPLE_FOR_EACH_8(Macro, Data, Tuple) \
212 Macro(Data, __VEG_PP_HEAD Tuple) \
213 __VEG_IMPL_PP_TUPLE_FOR_EACH_7(Macro, Data, (__VEG_PP_TAIL Tuple))
214#define __VEG_IMPL_PP_TUPLE_FOR_EACH_9(Macro, Data, Tuple) \
215 Macro(Data, __VEG_PP_HEAD Tuple) \
216 __VEG_IMPL_PP_TUPLE_FOR_EACH_8(Macro, Data, (__VEG_PP_TAIL Tuple))
217#define __VEG_IMPL_PP_TUPLE_FOR_EACH_10(Macro, Data, Tuple) \
218 Macro(Data, __VEG_PP_HEAD Tuple) \
219 __VEG_IMPL_PP_TUPLE_FOR_EACH_9(Macro, Data, (__VEG_PP_TAIL Tuple))
220#define __VEG_IMPL_PP_TUPLE_FOR_EACH_11(Macro, Data, Tuple) \
221 Macro(Data, __VEG_PP_HEAD Tuple) \
222 __VEG_IMPL_PP_TUPLE_FOR_EACH_10(Macro, Data, (__VEG_PP_TAIL Tuple))
223#define __VEG_IMPL_PP_TUPLE_FOR_EACH_12(Macro, Data, Tuple) \
224 Macro(Data, __VEG_PP_HEAD Tuple) \
225 __VEG_IMPL_PP_TUPLE_FOR_EACH_11(Macro, Data, (__VEG_PP_TAIL Tuple))
226#define __VEG_IMPL_PP_TUPLE_FOR_EACH_13(Macro, Data, Tuple) \
227 Macro(Data, __VEG_PP_HEAD Tuple) \
228 __VEG_IMPL_PP_TUPLE_FOR_EACH_12(Macro, Data, (__VEG_PP_TAIL Tuple))
229#define __VEG_IMPL_PP_TUPLE_FOR_EACH_14(Macro, Data, Tuple) \
230 Macro(Data, __VEG_PP_HEAD Tuple) \
231 __VEG_IMPL_PP_TUPLE_FOR_EACH_13(Macro, Data, (__VEG_PP_TAIL Tuple))
232#define __VEG_IMPL_PP_TUPLE_FOR_EACH_15(Macro, Data, Tuple) \
233 Macro(Data, __VEG_PP_HEAD Tuple) \
234 __VEG_IMPL_PP_TUPLE_FOR_EACH_14(Macro, Data, (__VEG_PP_TAIL Tuple))
235#define __VEG_IMPL_PP_TUPLE_FOR_EACH_16(Macro, Data, Tuple) \
236 Macro(Data, __VEG_PP_HEAD Tuple) \
237 __VEG_IMPL_PP_TUPLE_FOR_EACH_15(Macro, Data, (__VEG_PP_TAIL Tuple))
238#define __VEG_IMPL_PP_TUPLE_FOR_EACH_17(Macro, Data, Tuple) \
239 Macro(Data, __VEG_PP_HEAD Tuple) \
240 __VEG_IMPL_PP_TUPLE_FOR_EACH_16(Macro, Data, (__VEG_PP_TAIL Tuple))
241#define __VEG_IMPL_PP_TUPLE_FOR_EACH_18(Macro, Data, Tuple) \
242 Macro(Data, __VEG_PP_HEAD Tuple) \
243 __VEG_IMPL_PP_TUPLE_FOR_EACH_17(Macro, Data, (__VEG_PP_TAIL Tuple))
244#define __VEG_IMPL_PP_TUPLE_FOR_EACH_19(Macro, Data, Tuple) \
245 Macro(Data, __VEG_PP_HEAD Tuple) \
246 __VEG_IMPL_PP_TUPLE_FOR_EACH_18(Macro, Data, (__VEG_PP_TAIL Tuple))
247#define __VEG_IMPL_PP_TUPLE_FOR_EACH_20(Macro, Data, Tuple) \
248 Macro(Data, __VEG_PP_HEAD Tuple) \
249 __VEG_IMPL_PP_TUPLE_FOR_EACH_19(Macro, Data, (__VEG_PP_TAIL Tuple))
250#define __VEG_IMPL_PP_TUPLE_FOR_EACH_21(Macro, Data, Tuple) \
251 Macro(Data, __VEG_PP_HEAD Tuple) \
252 __VEG_IMPL_PP_TUPLE_FOR_EACH_20(Macro, Data, (__VEG_PP_TAIL Tuple))
253#define __VEG_IMPL_PP_TUPLE_FOR_EACH_22(Macro, Data, Tuple) \
254 Macro(Data, __VEG_PP_HEAD Tuple) \
255 __VEG_IMPL_PP_TUPLE_FOR_EACH_21(Macro, Data, (__VEG_PP_TAIL Tuple))
256#define __VEG_IMPL_PP_TUPLE_FOR_EACH_23(Macro, Data, Tuple) \
257 Macro(Data, __VEG_PP_HEAD Tuple) \
258 __VEG_IMPL_PP_TUPLE_FOR_EACH_22(Macro, Data, (__VEG_PP_TAIL Tuple))
259#define __VEG_IMPL_PP_TUPLE_FOR_EACH_24(Macro, Data, Tuple) \
260 Macro(Data, __VEG_PP_HEAD Tuple) \
261 __VEG_IMPL_PP_TUPLE_FOR_EACH_23(Macro, Data, (__VEG_PP_TAIL Tuple))
262#define __VEG_IMPL_PP_TUPLE_FOR_EACH_25(Macro, Data, Tuple) \
263 Macro(Data, __VEG_PP_HEAD Tuple) \
264 __VEG_IMPL_PP_TUPLE_FOR_EACH_24(Macro, Data, (__VEG_PP_TAIL Tuple))
265#define __VEG_IMPL_PP_TUPLE_FOR_EACH_26(Macro, Data, Tuple) \
266 Macro(Data, __VEG_PP_HEAD Tuple) \
267 __VEG_IMPL_PP_TUPLE_FOR_EACH_25(Macro, Data, (__VEG_PP_TAIL Tuple))
268#define __VEG_IMPL_PP_TUPLE_FOR_EACH_27(Macro, Data, Tuple) \
269 Macro(Data, __VEG_PP_HEAD Tuple) \
270 __VEG_IMPL_PP_TUPLE_FOR_EACH_26(Macro, Data, (__VEG_PP_TAIL Tuple))
271#define __VEG_IMPL_PP_TUPLE_FOR_EACH_28(Macro, Data, Tuple) \
272 Macro(Data, __VEG_PP_HEAD Tuple) \
273 __VEG_IMPL_PP_TUPLE_FOR_EACH_27(Macro, Data, (__VEG_PP_TAIL Tuple))
274#define __VEG_IMPL_PP_TUPLE_FOR_EACH_29(Macro, Data, Tuple) \
275 Macro(Data, __VEG_PP_HEAD Tuple) \
276 __VEG_IMPL_PP_TUPLE_FOR_EACH_28(Macro, Data, (__VEG_PP_TAIL Tuple))
277#define __VEG_IMPL_PP_TUPLE_FOR_EACH_30(Macro, Data, Tuple) \
278 Macro(Data, __VEG_PP_HEAD Tuple) \
279 __VEG_IMPL_PP_TUPLE_FOR_EACH_29(Macro, Data, (__VEG_PP_TAIL Tuple))
280#define __VEG_IMPL_PP_TUPLE_FOR_EACH_31(Macro, Data, Tuple) \
281 Macro(Data, __VEG_PP_HEAD Tuple) \
282 __VEG_IMPL_PP_TUPLE_FOR_EACH_30(Macro, Data, (__VEG_PP_TAIL Tuple))
283#define __VEG_IMPL_PP_TUPLE_FOR_EACH_32(Macro, Data, Tuple) \
284 Macro(Data, __VEG_PP_HEAD Tuple) \
285 __VEG_IMPL_PP_TUPLE_FOR_EACH_31(Macro, Data, (__VEG_PP_TAIL Tuple))
286
287#define __VEG_IMPL_PP_TUPLE_FOR_EACH_I_1(Macro, Start, Data, Tuple) \
288 Macro(Start, Data, __VEG_PP_REMOVE_PAREN1(Tuple))
289#define __VEG_IMPL_PP_TUPLE_FOR_EACH_I_2(Macro, Start, Data, Tuple) \
290 Macro(Start, Data, __VEG_PP_HEAD Tuple) __VEG_IMPL_PP_TUPLE_FOR_EACH_I_1( \
291 Macro, __VEG_IMPL_PP_INC(Start), Data, (__VEG_PP_TAIL Tuple))
292#define __VEG_IMPL_PP_TUPLE_FOR_EACH_I_3(Macro, Start, Data, Tuple) \
293 Macro(Start, Data, __VEG_PP_HEAD Tuple) __VEG_IMPL_PP_TUPLE_FOR_EACH_I_2( \
294 Macro, __VEG_IMPL_PP_INC(Start), Data, (__VEG_PP_TAIL Tuple))
295#define __VEG_IMPL_PP_TUPLE_FOR_EACH_I_4(Macro, Start, Data, Tuple) \
296 Macro(Start, Data, __VEG_PP_HEAD Tuple) __VEG_IMPL_PP_TUPLE_FOR_EACH_I_3( \
297 Macro, __VEG_IMPL_PP_INC(Start), Data, (__VEG_PP_TAIL Tuple))
298#define __VEG_IMPL_PP_TUPLE_FOR_EACH_I_5(Macro, Start, Data, Tuple) \
299 Macro(Start, Data, __VEG_PP_HEAD Tuple) __VEG_IMPL_PP_TUPLE_FOR_EACH_I_4( \
300 Macro, __VEG_IMPL_PP_INC(Start), Data, (__VEG_PP_TAIL Tuple))
301#define __VEG_IMPL_PP_TUPLE_FOR_EACH_I_6(Macro, Start, Data, Tuple) \
302 Macro(Start, Data, __VEG_PP_HEAD Tuple) __VEG_IMPL_PP_TUPLE_FOR_EACH_I_5( \
303 Macro, __VEG_IMPL_PP_INC(Start), Data, (__VEG_PP_TAIL Tuple))
304#define __VEG_IMPL_PP_TUPLE_FOR_EACH_I_7(Macro, Start, Data, Tuple) \
305 Macro(Start, Data, __VEG_PP_HEAD Tuple) __VEG_IMPL_PP_TUPLE_FOR_EACH_I_6( \
306 Macro, __VEG_IMPL_PP_INC(Start), Data, (__VEG_PP_TAIL Tuple))
307#define __VEG_IMPL_PP_TUPLE_FOR_EACH_I_8(Macro, Start, Data, Tuple) \
308 Macro(Start, Data, __VEG_PP_HEAD Tuple) __VEG_IMPL_PP_TUPLE_FOR_EACH_I_7( \
309 Macro, __VEG_IMPL_PP_INC(Start), Data, (__VEG_PP_TAIL Tuple))
310#define __VEG_IMPL_PP_TUPLE_FOR_EACH_I_9(Macro, Start, Data, Tuple) \
311 Macro(Start, Data, __VEG_PP_HEAD Tuple) __VEG_IMPL_PP_TUPLE_FOR_EACH_I_8( \
312 Macro, __VEG_IMPL_PP_INC(Start), Data, (__VEG_PP_TAIL Tuple))
313#define __VEG_IMPL_PP_TUPLE_FOR_EACH_I_10(Macro, Start, Data, Tuple) \
314 Macro(Start, Data, __VEG_PP_HEAD Tuple) __VEG_IMPL_PP_TUPLE_FOR_EACH_I_9( \
315 Macro, __VEG_IMPL_PP_INC(Start), Data, (__VEG_PP_TAIL Tuple))
316#define __VEG_IMPL_PP_TUPLE_FOR_EACH_I_11(Macro, Start, Data, Tuple) \
317 Macro(Start, Data, __VEG_PP_HEAD Tuple) __VEG_IMPL_PP_TUPLE_FOR_EACH_I_10( \
318 Macro, __VEG_IMPL_PP_INC(Start), Data, (__VEG_PP_TAIL Tuple))
319#define __VEG_IMPL_PP_TUPLE_FOR_EACH_I_12(Macro, Start, Data, Tuple) \
320 Macro(Start, Data, __VEG_PP_HEAD Tuple) __VEG_IMPL_PP_TUPLE_FOR_EACH_I_11( \
321 Macro, __VEG_IMPL_PP_INC(Start), Data, (__VEG_PP_TAIL Tuple))
322#define __VEG_IMPL_PP_TUPLE_FOR_EACH_I_13(Macro, Start, Data, Tuple) \
323 Macro(Start, Data, __VEG_PP_HEAD Tuple) __VEG_IMPL_PP_TUPLE_FOR_EACH_I_12( \
324 Macro, __VEG_IMPL_PP_INC(Start), Data, (__VEG_PP_TAIL Tuple))
325#define __VEG_IMPL_PP_TUPLE_FOR_EACH_I_14(Macro, Start, Data, Tuple) \
326 Macro(Start, Data, __VEG_PP_HEAD Tuple) __VEG_IMPL_PP_TUPLE_FOR_EACH_I_13( \
327 Macro, __VEG_IMPL_PP_INC(Start), Data, (__VEG_PP_TAIL Tuple))
328#define __VEG_IMPL_PP_TUPLE_FOR_EACH_I_15(Macro, Start, Data, Tuple) \
329 Macro(Start, Data, __VEG_PP_HEAD Tuple) __VEG_IMPL_PP_TUPLE_FOR_EACH_I_14( \
330 Macro, __VEG_IMPL_PP_INC(Start), Data, (__VEG_PP_TAIL Tuple))
331#define __VEG_IMPL_PP_TUPLE_FOR_EACH_I_16(Macro, Start, Data, Tuple) \
332 Macro(Start, Data, __VEG_PP_HEAD Tuple) __VEG_IMPL_PP_TUPLE_FOR_EACH_I_15( \
333 Macro, __VEG_IMPL_PP_INC(Start), Data, (__VEG_PP_TAIL Tuple))
334#define __VEG_IMPL_PP_TUPLE_FOR_EACH_I_17(Macro, Start, Data, Tuple) \
335 Macro(Start, Data, __VEG_PP_HEAD Tuple) __VEG_IMPL_PP_TUPLE_FOR_EACH_I_16( \
336 Macro, __VEG_IMPL_PP_INC(Start), Data, (__VEG_PP_TAIL Tuple))
337#define __VEG_IMPL_PP_TUPLE_FOR_EACH_I_18(Macro, Start, Data, Tuple) \
338 Macro(Start, Data, __VEG_PP_HEAD Tuple) __VEG_IMPL_PP_TUPLE_FOR_EACH_I_17( \
339 Macro, __VEG_IMPL_PP_INC(Start), Data, (__VEG_PP_TAIL Tuple))
340#define __VEG_IMPL_PP_TUPLE_FOR_EACH_I_19(Macro, Start, Data, Tuple) \
341 Macro(Start, Data, __VEG_PP_HEAD Tuple) __VEG_IMPL_PP_TUPLE_FOR_EACH_I_18( \
342 Macro, __VEG_IMPL_PP_INC(Start), Data, (__VEG_PP_TAIL Tuple))
343#define __VEG_IMPL_PP_TUPLE_FOR_EACH_I_20(Macro, Start, Data, Tuple) \
344 Macro(Start, Data, __VEG_PP_HEAD Tuple) __VEG_IMPL_PP_TUPLE_FOR_EACH_I_19( \
345 Macro, __VEG_IMPL_PP_INC(Start), Data, (__VEG_PP_TAIL Tuple))
346#define __VEG_IMPL_PP_TUPLE_FOR_EACH_I_21(Macro, Start, Data, Tuple) \
347 Macro(Start, Data, __VEG_PP_HEAD Tuple) __VEG_IMPL_PP_TUPLE_FOR_EACH_I_20( \
348 Macro, __VEG_IMPL_PP_INC(Start), Data, (__VEG_PP_TAIL Tuple))
349#define __VEG_IMPL_PP_TUPLE_FOR_EACH_I_22(Macro, Start, Data, Tuple) \
350 Macro(Start, Data, __VEG_PP_HEAD Tuple) __VEG_IMPL_PP_TUPLE_FOR_EACH_I_21( \
351 Macro, __VEG_IMPL_PP_INC(Start), Data, (__VEG_PP_TAIL Tuple))
352#define __VEG_IMPL_PP_TUPLE_FOR_EACH_I_23(Macro, Start, Data, Tuple) \
353 Macro(Start, Data, __VEG_PP_HEAD Tuple) __VEG_IMPL_PP_TUPLE_FOR_EACH_I_22( \
354 Macro, __VEG_IMPL_PP_INC(Start), Data, (__VEG_PP_TAIL Tuple))
355#define __VEG_IMPL_PP_TUPLE_FOR_EACH_I_24(Macro, Start, Data, Tuple) \
356 Macro(Start, Data, __VEG_PP_HEAD Tuple) __VEG_IMPL_PP_TUPLE_FOR_EACH_I_23( \
357 Macro, __VEG_IMPL_PP_INC(Start), Data, (__VEG_PP_TAIL Tuple))
358#define __VEG_IMPL_PP_TUPLE_FOR_EACH_I_25(Macro, Start, Data, Tuple) \
359 Macro(Start, Data, __VEG_PP_HEAD Tuple) __VEG_IMPL_PP_TUPLE_FOR_EACH_I_24( \
360 Macro, __VEG_IMPL_PP_INC(Start), Data, (__VEG_PP_TAIL Tuple))
361#define __VEG_IMPL_PP_TUPLE_FOR_EACH_I_26(Macro, Start, Data, Tuple) \
362 Macro(Start, Data, __VEG_PP_HEAD Tuple) __VEG_IMPL_PP_TUPLE_FOR_EACH_I_25( \
363 Macro, __VEG_IMPL_PP_INC(Start), Data, (__VEG_PP_TAIL Tuple))
364#define __VEG_IMPL_PP_TUPLE_FOR_EACH_I_27(Macro, Start, Data, Tuple) \
365 Macro(Start, Data, __VEG_PP_HEAD Tuple) __VEG_IMPL_PP_TUPLE_FOR_EACH_I_26( \
366 Macro, __VEG_IMPL_PP_INC(Start), Data, (__VEG_PP_TAIL Tuple))
367#define __VEG_IMPL_PP_TUPLE_FOR_EACH_I_28(Macro, Start, Data, Tuple) \
368 Macro(Start, Data, __VEG_PP_HEAD Tuple) __VEG_IMPL_PP_TUPLE_FOR_EACH_I_27( \
369 Macro, __VEG_IMPL_PP_INC(Start), Data, (__VEG_PP_TAIL Tuple))
370#define __VEG_IMPL_PP_TUPLE_FOR_EACH_I_29(Macro, Start, Data, Tuple) \
371 Macro(Start, Data, __VEG_PP_HEAD Tuple) __VEG_IMPL_PP_TUPLE_FOR_EACH_I_28( \
372 Macro, __VEG_IMPL_PP_INC(Start), Data, (__VEG_PP_TAIL Tuple))
373#define __VEG_IMPL_PP_TUPLE_FOR_EACH_I_30(Macro, Start, Data, Tuple) \
374 Macro(Start, Data, __VEG_PP_HEAD Tuple) __VEG_IMPL_PP_TUPLE_FOR_EACH_I_29( \
375 Macro, __VEG_IMPL_PP_INC(Start), Data, (__VEG_PP_TAIL Tuple))
376#define __VEG_IMPL_PP_TUPLE_FOR_EACH_I_31(Macro, Start, Data, Tuple) \
377 Macro(Start, Data, __VEG_PP_HEAD Tuple) __VEG_IMPL_PP_TUPLE_FOR_EACH_I_30( \
378 Macro, __VEG_IMPL_PP_INC(Start), Data, (__VEG_PP_TAIL Tuple))
379#define __VEG_IMPL_PP_TUPLE_FOR_EACH_I_32(Macro, Start, Data, Tuple) \
380 Macro(Start, Data, __VEG_PP_HEAD Tuple) __VEG_IMPL_PP_TUPLE_FOR_EACH_I_31( \
381 Macro, __VEG_IMPL_PP_INC(Start), Data, (__VEG_PP_TAIL Tuple))
382
383#define __VEG_IMPL_PP_TRANSFORM_HELPER(I, Macro_Data, Elem) \
384 , __VEG_PP_HEAD Macro_Data( \
385 __VEG_IMPL_PP_INC(I), __VEG_PP_TAIL Macro_Data, Elem)
386
387#define __VEG_IMPL_PP_TRANSFORM_0(Macro, Data, Tuple) \
388 (Macro(0, Data, __VEG_PP_HEAD Tuple) __VEG_PP_TUPLE_FOR_EACH_I( \
389 __VEG_IMPL_PP_TRANSFORM_HELPER, (Macro, Data), (__VEG_PP_TAIL Tuple)))
390
391#define __VEG_IMPL_PP_TRANSFORM_1(Macro, Data, Tuple) \
392 (Macro(0, Data, __VEG_PP_REMOVE_PAREN1(Tuple)))
393
394#define __VEG_PP_TUPLE_FOR_EACH_I(Macro, Data, Tuple) \
395 __VEG_PP_CAT2(__VEG_IMPL_PP_TUPLE_FOR_EACH_I_, __VEG_PP_TUPLE_SIZE(Tuple)) \
396 (Macro, 0, Data, Tuple)
397#define __VEG_PP_TUPLE_FOR_EACH(Macro, Data, Tuple) \
398 __VEG_PP_CAT2(__VEG_IMPL_PP_TUPLE_FOR_EACH_, __VEG_PP_TUPLE_SIZE(Tuple)) \
399 (Macro, Data, Tuple)
400
401#define __VEG_PP_TUPLE_TRANSFORM_I(Macro, Data, Tuple) \
402 __VEG_PP_CAT2(__VEG_IMPL_PP_TRANSFORM_, \
403 __VEG_IMPL_PP_IS_1(__VEG_PP_TUPLE_SIZE(Tuple))) \
404 (Macro, Data, Tuple)
405
406#define __VEG_PP_TUPLE_SIZE(Tuple) \
407 __VEG_PP_ID(__VEG_IMPL_PP_VARIADIC_SIZE Tuple)
408#define __VEG_PP_SEQ_HEAD(Seq) \
409 __VEG_IMPL_PP_SEQ_HEAD_0 Seq)
410#define __VEG_PP_SEQ_TAIL(Seq) __VEG_IMPL_PP_CONSUME Seq
411
412#define __VEG_PP_HEAD(...) \
413 __VEG_PP_CAT2(__VEG_IMPL_PP_HEAD_, \
414 __VEG_IMPL_PP_IS_1(__VEG_IMPL_PP_VARIADIC_SIZE(__VA_ARGS__))) \
415 (__VA_ARGS__)
416#define __VEG_PP_TAIL(...) \
417 __VEG_PP_CAT2(__VEG_IMPL_PP_TAIL_, \
418 __VEG_IMPL_PP_IS_1(__VEG_IMPL_PP_VARIADIC_SIZE(__VA_ARGS__))) \
419 (__VA_ARGS__)
420
421#define __VEG_PP_STRINGIZE(...) __VEG_IMPL_PP_STRINGIZE(__VA_ARGS__)
422#define __VEG_PP_CAT(A, ...) __VEG_IMPL_PP_CAT(A, __VA_ARGS__)
423#define __VEG_PP_CAT2(A, ...) __VEG_IMPL_PP_CAT2(A, __VA_ARGS__)
424#define __VEG_PP_CAT3(A, ...) __VEG_IMPL_PP_CAT3(A, __VA_ARGS__)
425#define __VEG_PP_REMOVE_PAREN(...) \
426 __VEG_IMPL_PP_REMOVE_PAREN2( \
427 __VEG_PP_ID(__VEG_IMPL_PP_REMOVE_PAREN1 __VA_ARGS__))
428#define __VEG_PP_REMOVE_PAREN1(...) \
429 __VEG_IMPL_PP_REMOVE_PAREN21( \
430 __VEG_PP_ID(__VEG_IMPL_PP_REMOVE_PAREN11 __VA_ARGS__))
431#define __VEG_PP_UNWRAP(...) \
432 __VEG_PP_ID(__VEG_PP_HEAD __VA_ARGS__ __VEG_PP_TAIL __VA_ARGS__)
433
434#endif /* end of include guard VEG_PREPROCESSOR_HPP_U2V3WRWYS */