MessagePack for C++
Loading...
Searching...
No Matches
counter.hpp
Go to the documentation of this file.
1# /* **************************************************************************
2# * *
3# * (C) Copyright Paul Mensonides 2005. *
4# * Distributed under the Boost Software License, Version 1.0. (See *
5# * accompanying file LICENSE_1_0.txt or copy at *
6# * http://www.boost.org/LICENSE_1_0.txt) *
7# * *
8# ************************************************************************** */
9#
10# /* See http://www.boost.org for most recent version. */
11#
12# define MSGPACK_PP_VALUE MSGPACK_PP_COUNTER + 1
13#
15#
16# undef MSGPACK_PP_COUNTER
17#
18# undef MSGPACK_PP_COUNTER_DIGIT_1
19# undef MSGPACK_PP_COUNTER_DIGIT_2
20# undef MSGPACK_PP_COUNTER_DIGIT_3
21# undef MSGPACK_PP_COUNTER_DIGIT_4
22# undef MSGPACK_PP_COUNTER_DIGIT_5
23# undef MSGPACK_PP_COUNTER_DIGIT_6
24# undef MSGPACK_PP_COUNTER_DIGIT_7
25# undef MSGPACK_PP_COUNTER_DIGIT_8
26# undef MSGPACK_PP_COUNTER_DIGIT_9
27# undef MSGPACK_PP_COUNTER_DIGIT_10
28#
29# if MSGPACK_PP_SLOT_TEMP_10 == 0
30# define MSGPACK_PP_COUNTER_DIGIT_10 0
31# elif MSGPACK_PP_SLOT_TEMP_10 == 1
32# define MSGPACK_PP_COUNTER_DIGIT_10 1
33# elif MSGPACK_PP_SLOT_TEMP_10 == 2
34# define MSGPACK_PP_COUNTER_DIGIT_10 2
35# elif MSGPACK_PP_SLOT_TEMP_10 == 3
36# define MSGPACK_PP_COUNTER_DIGIT_10 3
37# elif MSGPACK_PP_SLOT_TEMP_10 == 4
38# define MSGPACK_PP_COUNTER_DIGIT_10 4
39# elif MSGPACK_PP_SLOT_TEMP_10 == 5
40# define MSGPACK_PP_COUNTER_DIGIT_10 5
41# elif MSGPACK_PP_SLOT_TEMP_10 == 6
42# define MSGPACK_PP_COUNTER_DIGIT_10 6
43# elif MSGPACK_PP_SLOT_TEMP_10 == 7
44# define MSGPACK_PP_COUNTER_DIGIT_10 7
45# elif MSGPACK_PP_SLOT_TEMP_10 == 8
46# define MSGPACK_PP_COUNTER_DIGIT_10 8
47# elif MSGPACK_PP_SLOT_TEMP_10 == 9
48# define MSGPACK_PP_COUNTER_DIGIT_10 9
49# endif
50#
51# if MSGPACK_PP_SLOT_TEMP_9 == 0
52# define MSGPACK_PP_COUNTER_DIGIT_9 0
53# elif MSGPACK_PP_SLOT_TEMP_9 == 1
54# define MSGPACK_PP_COUNTER_DIGIT_9 1
55# elif MSGPACK_PP_SLOT_TEMP_9 == 2
56# define MSGPACK_PP_COUNTER_DIGIT_9 2
57# elif MSGPACK_PP_SLOT_TEMP_9 == 3
58# define MSGPACK_PP_COUNTER_DIGIT_9 3
59# elif MSGPACK_PP_SLOT_TEMP_9 == 4
60# define MSGPACK_PP_COUNTER_DIGIT_9 4
61# elif MSGPACK_PP_SLOT_TEMP_9 == 5
62# define MSGPACK_PP_COUNTER_DIGIT_9 5
63# elif MSGPACK_PP_SLOT_TEMP_9 == 6
64# define MSGPACK_PP_COUNTER_DIGIT_9 6
65# elif MSGPACK_PP_SLOT_TEMP_9 == 7
66# define MSGPACK_PP_COUNTER_DIGIT_9 7
67# elif MSGPACK_PP_SLOT_TEMP_9 == 8
68# define MSGPACK_PP_COUNTER_DIGIT_9 8
69# elif MSGPACK_PP_SLOT_TEMP_9 == 9
70# define MSGPACK_PP_COUNTER_DIGIT_9 9
71# endif
72#
73# if MSGPACK_PP_SLOT_TEMP_8 == 0
74# define MSGPACK_PP_COUNTER_DIGIT_8 0
75# elif MSGPACK_PP_SLOT_TEMP_8 == 1
76# define MSGPACK_PP_COUNTER_DIGIT_8 1
77# elif MSGPACK_PP_SLOT_TEMP_8 == 2
78# define MSGPACK_PP_COUNTER_DIGIT_8 2
79# elif MSGPACK_PP_SLOT_TEMP_8 == 3
80# define MSGPACK_PP_COUNTER_DIGIT_8 3
81# elif MSGPACK_PP_SLOT_TEMP_8 == 4
82# define MSGPACK_PP_COUNTER_DIGIT_8 4
83# elif MSGPACK_PP_SLOT_TEMP_8 == 5
84# define MSGPACK_PP_COUNTER_DIGIT_8 5
85# elif MSGPACK_PP_SLOT_TEMP_8 == 6
86# define MSGPACK_PP_COUNTER_DIGIT_8 6
87# elif MSGPACK_PP_SLOT_TEMP_8 == 7
88# define MSGPACK_PP_COUNTER_DIGIT_8 7
89# elif MSGPACK_PP_SLOT_TEMP_8 == 8
90# define MSGPACK_PP_COUNTER_DIGIT_8 8
91# elif MSGPACK_PP_SLOT_TEMP_8 == 9
92# define MSGPACK_PP_COUNTER_DIGIT_8 9
93# endif
94#
95# if MSGPACK_PP_SLOT_TEMP_7 == 0
96# define MSGPACK_PP_COUNTER_DIGIT_7 0
97# elif MSGPACK_PP_SLOT_TEMP_7 == 1
98# define MSGPACK_PP_COUNTER_DIGIT_7 1
99# elif MSGPACK_PP_SLOT_TEMP_7 == 2
100# define MSGPACK_PP_COUNTER_DIGIT_7 2
101# elif MSGPACK_PP_SLOT_TEMP_7 == 3
102# define MSGPACK_PP_COUNTER_DIGIT_7 3
103# elif MSGPACK_PP_SLOT_TEMP_7 == 4
104# define MSGPACK_PP_COUNTER_DIGIT_7 4
105# elif MSGPACK_PP_SLOT_TEMP_7 == 5
106# define MSGPACK_PP_COUNTER_DIGIT_7 5
107# elif MSGPACK_PP_SLOT_TEMP_7 == 6
108# define MSGPACK_PP_COUNTER_DIGIT_7 6
109# elif MSGPACK_PP_SLOT_TEMP_7 == 7
110# define MSGPACK_PP_COUNTER_DIGIT_7 7
111# elif MSGPACK_PP_SLOT_TEMP_7 == 8
112# define MSGPACK_PP_COUNTER_DIGIT_7 8
113# elif MSGPACK_PP_SLOT_TEMP_7 == 9
114# define MSGPACK_PP_COUNTER_DIGIT_7 9
115# endif
116#
117# if MSGPACK_PP_SLOT_TEMP_6 == 0
118# define MSGPACK_PP_COUNTER_DIGIT_6 0
119# elif MSGPACK_PP_SLOT_TEMP_6 == 1
120# define MSGPACK_PP_COUNTER_DIGIT_6 1
121# elif MSGPACK_PP_SLOT_TEMP_6 == 2
122# define MSGPACK_PP_COUNTER_DIGIT_6 2
123# elif MSGPACK_PP_SLOT_TEMP_6 == 3
124# define MSGPACK_PP_COUNTER_DIGIT_6 3
125# elif MSGPACK_PP_SLOT_TEMP_6 == 4
126# define MSGPACK_PP_COUNTER_DIGIT_6 4
127# elif MSGPACK_PP_SLOT_TEMP_6 == 5
128# define MSGPACK_PP_COUNTER_DIGIT_6 5
129# elif MSGPACK_PP_SLOT_TEMP_6 == 6
130# define MSGPACK_PP_COUNTER_DIGIT_6 6
131# elif MSGPACK_PP_SLOT_TEMP_6 == 7
132# define MSGPACK_PP_COUNTER_DIGIT_6 7
133# elif MSGPACK_PP_SLOT_TEMP_6 == 8
134# define MSGPACK_PP_COUNTER_DIGIT_6 8
135# elif MSGPACK_PP_SLOT_TEMP_6 == 9
136# define MSGPACK_PP_COUNTER_DIGIT_6 9
137# endif
138#
139# if MSGPACK_PP_SLOT_TEMP_5 == 0
140# define MSGPACK_PP_COUNTER_DIGIT_5 0
141# elif MSGPACK_PP_SLOT_TEMP_5 == 1
142# define MSGPACK_PP_COUNTER_DIGIT_5 1
143# elif MSGPACK_PP_SLOT_TEMP_5 == 2
144# define MSGPACK_PP_COUNTER_DIGIT_5 2
145# elif MSGPACK_PP_SLOT_TEMP_5 == 3
146# define MSGPACK_PP_COUNTER_DIGIT_5 3
147# elif MSGPACK_PP_SLOT_TEMP_5 == 4
148# define MSGPACK_PP_COUNTER_DIGIT_5 4
149# elif MSGPACK_PP_SLOT_TEMP_5 == 5
150# define MSGPACK_PP_COUNTER_DIGIT_5 5
151# elif MSGPACK_PP_SLOT_TEMP_5 == 6
152# define MSGPACK_PP_COUNTER_DIGIT_5 6
153# elif MSGPACK_PP_SLOT_TEMP_5 == 7
154# define MSGPACK_PP_COUNTER_DIGIT_5 7
155# elif MSGPACK_PP_SLOT_TEMP_5 == 8
156# define MSGPACK_PP_COUNTER_DIGIT_5 8
157# elif MSGPACK_PP_SLOT_TEMP_5 == 9
158# define MSGPACK_PP_COUNTER_DIGIT_5 9
159# endif
160#
161# if MSGPACK_PP_SLOT_TEMP_4 == 0
162# define MSGPACK_PP_COUNTER_DIGIT_4 0
163# elif MSGPACK_PP_SLOT_TEMP_4 == 1
164# define MSGPACK_PP_COUNTER_DIGIT_4 1
165# elif MSGPACK_PP_SLOT_TEMP_4 == 2
166# define MSGPACK_PP_COUNTER_DIGIT_4 2
167# elif MSGPACK_PP_SLOT_TEMP_4 == 3
168# define MSGPACK_PP_COUNTER_DIGIT_4 3
169# elif MSGPACK_PP_SLOT_TEMP_4 == 4
170# define MSGPACK_PP_COUNTER_DIGIT_4 4
171# elif MSGPACK_PP_SLOT_TEMP_4 == 5
172# define MSGPACK_PP_COUNTER_DIGIT_4 5
173# elif MSGPACK_PP_SLOT_TEMP_4 == 6
174# define MSGPACK_PP_COUNTER_DIGIT_4 6
175# elif MSGPACK_PP_SLOT_TEMP_4 == 7
176# define MSGPACK_PP_COUNTER_DIGIT_4 7
177# elif MSGPACK_PP_SLOT_TEMP_4 == 8
178# define MSGPACK_PP_COUNTER_DIGIT_4 8
179# elif MSGPACK_PP_SLOT_TEMP_4 == 9
180# define MSGPACK_PP_COUNTER_DIGIT_4 9
181# endif
182#
183# if MSGPACK_PP_SLOT_TEMP_3 == 0
184# define MSGPACK_PP_COUNTER_DIGIT_3 0
185# elif MSGPACK_PP_SLOT_TEMP_3 == 1
186# define MSGPACK_PP_COUNTER_DIGIT_3 1
187# elif MSGPACK_PP_SLOT_TEMP_3 == 2
188# define MSGPACK_PP_COUNTER_DIGIT_3 2
189# elif MSGPACK_PP_SLOT_TEMP_3 == 3
190# define MSGPACK_PP_COUNTER_DIGIT_3 3
191# elif MSGPACK_PP_SLOT_TEMP_3 == 4
192# define MSGPACK_PP_COUNTER_DIGIT_3 4
193# elif MSGPACK_PP_SLOT_TEMP_3 == 5
194# define MSGPACK_PP_COUNTER_DIGIT_3 5
195# elif MSGPACK_PP_SLOT_TEMP_3 == 6
196# define MSGPACK_PP_COUNTER_DIGIT_3 6
197# elif MSGPACK_PP_SLOT_TEMP_3 == 7
198# define MSGPACK_PP_COUNTER_DIGIT_3 7
199# elif MSGPACK_PP_SLOT_TEMP_3 == 8
200# define MSGPACK_PP_COUNTER_DIGIT_3 8
201# elif MSGPACK_PP_SLOT_TEMP_3 == 9
202# define MSGPACK_PP_COUNTER_DIGIT_3 9
203# endif
204#
205# if MSGPACK_PP_SLOT_TEMP_2 == 0
206# define MSGPACK_PP_COUNTER_DIGIT_2 0
207# elif MSGPACK_PP_SLOT_TEMP_2 == 1
208# define MSGPACK_PP_COUNTER_DIGIT_2 1
209# elif MSGPACK_PP_SLOT_TEMP_2 == 2
210# define MSGPACK_PP_COUNTER_DIGIT_2 2
211# elif MSGPACK_PP_SLOT_TEMP_2 == 3
212# define MSGPACK_PP_COUNTER_DIGIT_2 3
213# elif MSGPACK_PP_SLOT_TEMP_2 == 4
214# define MSGPACK_PP_COUNTER_DIGIT_2 4
215# elif MSGPACK_PP_SLOT_TEMP_2 == 5
216# define MSGPACK_PP_COUNTER_DIGIT_2 5
217# elif MSGPACK_PP_SLOT_TEMP_2 == 6
218# define MSGPACK_PP_COUNTER_DIGIT_2 6
219# elif MSGPACK_PP_SLOT_TEMP_2 == 7
220# define MSGPACK_PP_COUNTER_DIGIT_2 7
221# elif MSGPACK_PP_SLOT_TEMP_2 == 8
222# define MSGPACK_PP_COUNTER_DIGIT_2 8
223# elif MSGPACK_PP_SLOT_TEMP_2 == 9
224# define MSGPACK_PP_COUNTER_DIGIT_2 9
225# endif
226#
227# if MSGPACK_PP_SLOT_TEMP_1 == 0
228# define MSGPACK_PP_COUNTER_DIGIT_1 0
229# elif MSGPACK_PP_SLOT_TEMP_1 == 1
230# define MSGPACK_PP_COUNTER_DIGIT_1 1
231# elif MSGPACK_PP_SLOT_TEMP_1 == 2
232# define MSGPACK_PP_COUNTER_DIGIT_1 2
233# elif MSGPACK_PP_SLOT_TEMP_1 == 3
234# define MSGPACK_PP_COUNTER_DIGIT_1 3
235# elif MSGPACK_PP_SLOT_TEMP_1 == 4
236# define MSGPACK_PP_COUNTER_DIGIT_1 4
237# elif MSGPACK_PP_SLOT_TEMP_1 == 5
238# define MSGPACK_PP_COUNTER_DIGIT_1 5
239# elif MSGPACK_PP_SLOT_TEMP_1 == 6
240# define MSGPACK_PP_COUNTER_DIGIT_1 6
241# elif MSGPACK_PP_SLOT_TEMP_1 == 7
242# define MSGPACK_PP_COUNTER_DIGIT_1 7
243# elif MSGPACK_PP_SLOT_TEMP_1 == 8
244# define MSGPACK_PP_COUNTER_DIGIT_1 8
245# elif MSGPACK_PP_SLOT_TEMP_1 == 9
246# define MSGPACK_PP_COUNTER_DIGIT_1 9
247# endif
248#
249# if MSGPACK_PP_COUNTER_DIGIT_10
250# define MSGPACK_PP_COUNTER MSGPACK_PP_SLOT_CC_10(MSGPACK_PP_COUNTER_DIGIT_10, MSGPACK_PP_COUNTER_DIGIT_9, MSGPACK_PP_COUNTER_DIGIT_8, MSGPACK_PP_COUNTER_DIGIT_7, MSGPACK_PP_COUNTER_DIGIT_6, MSGPACK_PP_COUNTER_DIGIT_5, MSGPACK_PP_COUNTER_DIGIT_4, MSGPACK_PP_COUNTER_DIGIT_3, MSGPACK_PP_COUNTER_DIGIT_2, MSGPACK_PP_COUNTER_DIGIT_1)
251# elif MSGPACK_PP_COUNTER_DIGIT_9
252# define MSGPACK_PP_COUNTER MSGPACK_PP_SLOT_CC_9(MSGPACK_PP_COUNTER_DIGIT_9, MSGPACK_PP_COUNTER_DIGIT_8, MSGPACK_PP_COUNTER_DIGIT_7, MSGPACK_PP_COUNTER_DIGIT_6, MSGPACK_PP_COUNTER_DIGIT_5, MSGPACK_PP_COUNTER_DIGIT_4, MSGPACK_PP_COUNTER_DIGIT_3, MSGPACK_PP_COUNTER_DIGIT_2, MSGPACK_PP_COUNTER_DIGIT_1)
253# elif MSGPACK_PP_COUNTER_DIGIT_8
254# define MSGPACK_PP_COUNTER MSGPACK_PP_SLOT_CC_8(MSGPACK_PP_COUNTER_DIGIT_8, MSGPACK_PP_COUNTER_DIGIT_7, MSGPACK_PP_COUNTER_DIGIT_6, MSGPACK_PP_COUNTER_DIGIT_5, MSGPACK_PP_COUNTER_DIGIT_4, MSGPACK_PP_COUNTER_DIGIT_3, MSGPACK_PP_COUNTER_DIGIT_2, MSGPACK_PP_COUNTER_DIGIT_1)
255# elif MSGPACK_PP_COUNTER_DIGIT_7
256# define MSGPACK_PP_COUNTER MSGPACK_PP_SLOT_CC_7(MSGPACK_PP_COUNTER_DIGIT_7, MSGPACK_PP_COUNTER_DIGIT_6, MSGPACK_PP_COUNTER_DIGIT_5, MSGPACK_PP_COUNTER_DIGIT_4, MSGPACK_PP_COUNTER_DIGIT_3, MSGPACK_PP_COUNTER_DIGIT_2, MSGPACK_PP_COUNTER_DIGIT_1)
257# elif MSGPACK_PP_COUNTER_DIGIT_6
258# define MSGPACK_PP_COUNTER MSGPACK_PP_SLOT_CC_6(MSGPACK_PP_COUNTER_DIGIT_6, MSGPACK_PP_COUNTER_DIGIT_5, MSGPACK_PP_COUNTER_DIGIT_4, MSGPACK_PP_COUNTER_DIGIT_3, MSGPACK_PP_COUNTER_DIGIT_2, MSGPACK_PP_COUNTER_DIGIT_1)
259# elif MSGPACK_PP_COUNTER_DIGIT_5
260# define MSGPACK_PP_COUNTER MSGPACK_PP_SLOT_CC_5(MSGPACK_PP_COUNTER_DIGIT_5, MSGPACK_PP_COUNTER_DIGIT_4, MSGPACK_PP_COUNTER_DIGIT_3, MSGPACK_PP_COUNTER_DIGIT_2, MSGPACK_PP_COUNTER_DIGIT_1)
261# elif MSGPACK_PP_COUNTER_DIGIT_4
262# define MSGPACK_PP_COUNTER MSGPACK_PP_SLOT_CC_4(MSGPACK_PP_COUNTER_DIGIT_4, MSGPACK_PP_COUNTER_DIGIT_3, MSGPACK_PP_COUNTER_DIGIT_2, MSGPACK_PP_COUNTER_DIGIT_1)
263# elif MSGPACK_PP_COUNTER_DIGIT_3
264# define MSGPACK_PP_COUNTER MSGPACK_PP_SLOT_CC_3(MSGPACK_PP_COUNTER_DIGIT_3, MSGPACK_PP_COUNTER_DIGIT_2, MSGPACK_PP_COUNTER_DIGIT_1)
265# elif MSGPACK_PP_COUNTER_DIGIT_2
266# define MSGPACK_PP_COUNTER MSGPACK_PP_SLOT_CC_2(MSGPACK_PP_COUNTER_DIGIT_2, MSGPACK_PP_COUNTER_DIGIT_1)
267# else
268# define MSGPACK_PP_COUNTER MSGPACK_PP_COUNTER_DIGIT_1
269# endif