COMMS
Template library intended to help with implementation of communication protocols.
Loading...
Searching...
No Matches
fields_access.h
1//
2// Copyright 2016 - 2024 (C). Alex Robenko. All rights reserved.
3//
4// This Source Code Form is subject to the terms of the Mozilla Public
5// License, v. 2.0. If a copy of the MPL was not distributed with this
6// file, You can obtain one at http://mozilla.org/MPL/2.0/.
7
8#pragma once
9
10#include <tuple>
11#include <type_traits>
12
13#include "macro_common.h"
14#include "gen_enum.h"
15#include "base_detection.h"
16
17#ifdef COMMS_MUST_DEFINE_BASE
18#define COMMS_FIELD_VALUE_ACCESS_FUNC typename Base::ValueType& value()
19#define COMMS_FIELD_VALUE_ACCESS_CONST_FUNC const typename Base::ValueType& value() const
20#define COMMS_ACCESS_MEMBER_FIELD_FUNC(T_, t_, n_) \
21 typename std::tuple_element<COMMS_CONCATENATE(FieldIdx_, n_), typename Base::T_>::type& COMMS_CONCATENATE(field_, n_)()
22#define COMMS_ACCESS_MEMBER_FIELD_CONST_FUNC(T_, t_, n_) \
23 const typename std::tuple_element<COMMS_CONCATENATE(FieldIdx_, n_), typename Base::T_>::type& COMMS_CONCATENATE(field_, n_)() const
24#define COMMS_MSG_FIELDS_ACCESS_FUNC \
25 typename Base::AllFields& fields()
26#define COMMS_MSG_FIELDS_ACCESS_CONST_FUNC \
27 const typename Base::AllFields& fields() const
28
29#else // #ifdef COMMS_MUST_DEFINE_BASE
30#define COMMS_FIELD_VALUE_ACCESS_FUNC FUNC_AUTO_REF_RETURN(value, decltype(comms::field::toFieldBase(*this).value()))
31#define COMMS_FIELD_VALUE_ACCESS_CONST_FUNC FUNC_AUTO_REF_RETURN_CONST(value, decltype(comms::field::toFieldBase(*this).value()))
32#define COMMS_ACCESS_MEMBER_FIELD_FUNC(T_, t_, n_) FUNC_AUTO_REF_RETURN(COMMS_CONCATENATE(field_, n_), decltype(std::get<COMMS_CONCATENATE(FieldIdx_, n_)>(t_)))
33#define COMMS_ACCESS_MEMBER_FIELD_CONST_FUNC(T_, t_, n_) FUNC_AUTO_REF_RETURN_CONST(COMMS_CONCATENATE(field_, n_), decltype(std::get<COMMS_CONCATENATE(FieldIdx_, n_)>(t_)))
34#define COMMS_MSG_FIELDS_ACCESS_FUNC FUNC_AUTO_REF_RETURN(fields, decltype(comms::toMessageBase(*this).fields()))
35#define COMMS_MSG_FIELDS_ACCESS_CONST_FUNC FUNC_AUTO_REF_RETURN_CONST(fields, decltype(comms::toMessageBase(*this).fields()))
36#endif // #ifdef COMMS_MUST_DEFINE_BASE
37
38#define COMMS_FIELD_ACC_FUNC(T_, t_, n_) \
39 COMMS_ACCESS_MEMBER_FIELD_FUNC(T_, t_, n_) {\
40 return std::get<COMMS_CONCATENATE(FieldIdx_, n_)>(t_); \
41 } \
42 COMMS_ACCESS_MEMBER_FIELD_CONST_FUNC(T_, t_, n_) {\
43 return std::get<COMMS_CONCATENATE(FieldIdx_, n_)>(t_); \
44 }
45
46#define COMMS_FIELD_ACC_FUNC_1(T_, t_, n_) COMMS_FIELD_ACC_FUNC(T_, t_, n_)
47#define COMMS_FIELD_ACC_FUNC_2(T_, t_, n_, ...) \
48 COMMS_FIELD_ACC_FUNC(T_, t_, n_) \
49 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_1(T_, t_, __VA_ARGS__))
50#define COMMS_FIELD_ACC_FUNC_3(T_, t_, n_, ...) \
51 COMMS_FIELD_ACC_FUNC(T_, t_, n_) \
52 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_2(T_, t_, __VA_ARGS__))
53#define COMMS_FIELD_ACC_FUNC_4(T_, t_, n_, ...) \
54 COMMS_FIELD_ACC_FUNC(T_, t_, n_) \
55 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_3(T_, t_, __VA_ARGS__))
56#define COMMS_FIELD_ACC_FUNC_5(T_, t_, n_, ...) \
57 COMMS_FIELD_ACC_FUNC(T_, t_, n_) \
58 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_4(T_, t_, __VA_ARGS__))
59#define COMMS_FIELD_ACC_FUNC_6(T_, t_, n_, ...) \
60 COMMS_FIELD_ACC_FUNC(T_, t_, n_) \
61 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_5(T_, t_, __VA_ARGS__))
62#define COMMS_FIELD_ACC_FUNC_7(T_, t_, n_, ...) \
63 COMMS_FIELD_ACC_FUNC(T_, t_, n_) \
64 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_6(T_, t_, __VA_ARGS__))
65#define COMMS_FIELD_ACC_FUNC_8(T_, t_, n_, ...) \
66 COMMS_FIELD_ACC_FUNC(T_, t_, n_) \
67 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_7(T_, t_, __VA_ARGS__))
68#define COMMS_FIELD_ACC_FUNC_9(T_, t_, n_, ...) \
69 COMMS_FIELD_ACC_FUNC(T_, t_, n_) \
70 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_8(T_, t_, __VA_ARGS__))
71#define COMMS_FIELD_ACC_FUNC_10(T_, t_, n_, ...) \
72 COMMS_FIELD_ACC_FUNC(T_, t_, n_) \
73 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_9(T_, t_, __VA_ARGS__))
74#define COMMS_FIELD_ACC_FUNC_11(T_, t_, n_, ...) \
75 COMMS_FIELD_ACC_FUNC(T_, t_, n_) \
76 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_10(T_, t_, __VA_ARGS__))
77#define COMMS_FIELD_ACC_FUNC_12(T_, t_, n_, ...) \
78 COMMS_FIELD_ACC_FUNC(T_, t_, n_) \
79 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_11(T_, t_, __VA_ARGS__))
80#define COMMS_FIELD_ACC_FUNC_13(T_, t_, n_, ...) \
81 COMMS_FIELD_ACC_FUNC(T_, t_, n_) \
82 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_12(T_, t_, __VA_ARGS__))
83#define COMMS_FIELD_ACC_FUNC_14(T_, t_, n_, ...) \
84 COMMS_FIELD_ACC_FUNC(T_, t_, n_) \
85 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_13(T_, t_, __VA_ARGS__))
86#define COMMS_FIELD_ACC_FUNC_15(T_, t_, n_, ...) \
87 COMMS_FIELD_ACC_FUNC(T_, t_, n_) \
88 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_14(T_, t_, __VA_ARGS__))
89#define COMMS_FIELD_ACC_FUNC_16(T_, t_, n_, ...) \
90 COMMS_FIELD_ACC_FUNC(T_, t_, n_) \
91 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_15(T_, t_, __VA_ARGS__))
92#define COMMS_FIELD_ACC_FUNC_17(T_, t_, n_, ...) \
93 COMMS_FIELD_ACC_FUNC(T_, t_, n_) \
94 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_16(T_, t_, __VA_ARGS__))
95#define COMMS_FIELD_ACC_FUNC_18(T_, t_, n_, ...) \
96 COMMS_FIELD_ACC_FUNC(T_, t_, n_) \
97 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_17(T_, t_, __VA_ARGS__))
98#define COMMS_FIELD_ACC_FUNC_19(T_, t_, n_, ...) \
99 COMMS_FIELD_ACC_FUNC(T_, t_, n_) \
100 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_18(T_, t_, __VA_ARGS__))
101#define COMMS_FIELD_ACC_FUNC_20(T_, t_, n_, ...) \
102 COMMS_FIELD_ACC_FUNC(T_, t_, n_) \
103 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_19(T_, t_, __VA_ARGS__))
104#define COMMS_FIELD_ACC_FUNC_21(T_, t_, n_, ...) \
105 COMMS_FIELD_ACC_FUNC(T_, t_, n_) \
106 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_20(T_, t_, __VA_ARGS__))
107#define COMMS_FIELD_ACC_FUNC_22(T_, t_, n_, ...) \
108 COMMS_FIELD_ACC_FUNC(T_, t_, n_) \
109 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_21(T_, t_, __VA_ARGS__))
110#define COMMS_FIELD_ACC_FUNC_23(T_, t_, n_, ...) \
111 COMMS_FIELD_ACC_FUNC(T_, t_, n_) \
112 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_22(T_, t_, __VA_ARGS__))
113#define COMMS_FIELD_ACC_FUNC_24(T_, t_, n_, ...) \
114 COMMS_FIELD_ACC_FUNC(T_, t_, n_) \
115 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_23(T_, t_, __VA_ARGS__))
116#define COMMS_FIELD_ACC_FUNC_25(T_, t_, n_, ...) \
117 COMMS_FIELD_ACC_FUNC(T_, t_, n_) \
118 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_24(T_, t_, __VA_ARGS__))
119#define COMMS_FIELD_ACC_FUNC_26(T_, t_, n_, ...) \
120 COMMS_FIELD_ACC_FUNC(T_, t_, n_) \
121 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_25(T_, t_, __VA_ARGS__))
122#define COMMS_FIELD_ACC_FUNC_27(T_, t_, n_, ...) \
123 COMMS_FIELD_ACC_FUNC(T_, t_, n_) \
124 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_26(T_, t_, __VA_ARGS__))
125#define COMMS_FIELD_ACC_FUNC_28(T_, t_, n_, ...) \
126 COMMS_FIELD_ACC_FUNC(T_, t_, n_) \
127 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_27(T_, t_, __VA_ARGS__))
128#define COMMS_FIELD_ACC_FUNC_29(T_, t_, n_, ...) \
129 COMMS_FIELD_ACC_FUNC(T_, t_, n_) \
130 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_28(T_, t_, __VA_ARGS__))
131#define COMMS_FIELD_ACC_FUNC_30(T_, t_, n_, ...) \
132 COMMS_FIELD_ACC_FUNC(T_, t_, n_) \
133 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_29(T_, t_, __VA_ARGS__))
134#define COMMS_FIELD_ACC_FUNC_31(T_, t_, n_, ...) \
135 COMMS_FIELD_ACC_FUNC(T_, t_, n_) \
136 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_30(T_, t_, __VA_ARGS__))
137#define COMMS_FIELD_ACC_FUNC_32(T_, t_, n_, ...) \
138 COMMS_FIELD_ACC_FUNC(T_, t_, n_) \
139 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_31(T_, t_, __VA_ARGS__))
140#define COMMS_FIELD_ACC_FUNC_33(T_, t_, n_, ...) \
141 COMMS_FIELD_ACC_FUNC(T_, t_, n_) \
142 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_32(T_, t_, __VA_ARGS__))
143#define COMMS_FIELD_ACC_FUNC_34(T_, t_, n_, ...) \
144 COMMS_FIELD_ACC_FUNC(T_, t_, n_) \
145 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_33(T_, t_, __VA_ARGS__))
146#define COMMS_FIELD_ACC_FUNC_35(T_, t_, n_, ...) \
147 COMMS_FIELD_ACC_FUNC(T_, t_, n_) \
148 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_34(T_, t_, __VA_ARGS__))
149#define COMMS_FIELD_ACC_FUNC_36(T_, t_, n_, ...) \
150 COMMS_FIELD_ACC_FUNC(T_, t_, n_) \
151 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_35(T_, t_, __VA_ARGS__))
152#define COMMS_FIELD_ACC_FUNC_37(T_, t_, n_, ...) \
153 COMMS_FIELD_ACC_FUNC(T_, t_, n_) \
154 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_36(T_, t_, __VA_ARGS__))
155#define COMMS_FIELD_ACC_FUNC_38(T_, t_, n_, ...) \
156 COMMS_FIELD_ACC_FUNC(T_, t_, n_) \
157 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_37(T_, t_, __VA_ARGS__))
158#define COMMS_FIELD_ACC_FUNC_39(T_, t_, n_, ...) \
159 COMMS_FIELD_ACC_FUNC(T_, t_, n_) \
160 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_38(T_, t_, __VA_ARGS__))
161#define COMMS_FIELD_ACC_FUNC_40(T_, t_, n_, ...) \
162 COMMS_FIELD_ACC_FUNC(T_, t_, n_) \
163 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_39(T_, t_, __VA_ARGS__))
164#define COMMS_FIELD_ACC_FUNC_41(T_, t_, n_, ...) \
165 COMMS_FIELD_ACC_FUNC(T_, t_, n_) \
166 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_40(T_, t_, __VA_ARGS__))
167#define COMMS_FIELD_ACC_FUNC_42(T_, t_, n_, ...) \
168 COMMS_FIELD_ACC_FUNC(T_, t_, n_) \
169 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_41(T_, t_, __VA_ARGS__))
170#define COMMS_FIELD_ACC_FUNC_43(T_, t_, n_, ...) \
171 COMMS_FIELD_ACC_FUNC(T_, t_, n_) \
172 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_42(T_, t_, __VA_ARGS__))
173#define COMMS_FIELD_ACC_FUNC_44(T_, t_, n_, ...) \
174 COMMS_FIELD_ACC_FUNC(T_, t_, n_) \
175 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_43(T_, t_, __VA_ARGS__))
176#define COMMS_FIELD_ACC_FUNC_45(T_, t_, n_, ...) \
177 COMMS_FIELD_ACC_FUNC(T_, t_, n_) \
178 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_44(T_, t_, __VA_ARGS__))
179#define COMMS_FIELD_ACC_FUNC_46(T_, t_, n_, ...) \
180 COMMS_FIELD_ACC_FUNC(T_, t_, n_) \
181 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_45(T_, t_, __VA_ARGS__))
182#define COMMS_FIELD_ACC_FUNC_47(T_, t_, n_, ...) \
183 COMMS_FIELD_ACC_FUNC(T_, t_, n_) \
184 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_46(T_, t_, __VA_ARGS__))
185#define COMMS_FIELD_ACC_FUNC_48(T_, t_, n_, ...) \
186 COMMS_FIELD_ACC_FUNC(T_, t_, n_) \
187 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_47(T_, t_, __VA_ARGS__))
188#define COMMS_FIELD_ACC_FUNC_49(T_, t_, n_, ...) \
189 COMMS_FIELD_ACC_FUNC(T_, t_, n_) \
190 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_48(T_, t_, __VA_ARGS__))
191#define COMMS_FIELD_ACC_FUNC_50(T_, t_, n_, ...) \
192 COMMS_FIELD_ACC_FUNC(T_, t_, n_) \
193 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_49(T_, t_, __VA_ARGS__))
194#define COMMS_FIELD_ACC_FUNC_51(T_, t_, n_, ...) \
195 COMMS_FIELD_ACC_FUNC(T_, t_, n_) \
196 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_49(T_, t_, __VA_ARGS__))
197#define COMMS_FIELD_ACC_FUNC_52(T_, t_, n_, ...) \
198 COMMS_FIELD_ACC_FUNC(T_, t_, n_) \
199 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_51(T_, t_, __VA_ARGS__))
200#define COMMS_FIELD_ACC_FUNC_53(T_, t_, n_, ...) \
201 COMMS_FIELD_ACC_FUNC(T_, t_, n_) \
202 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_52(T_, t_, __VA_ARGS__))
203#define COMMS_FIELD_ACC_FUNC_54(T_, t_, n_, ...) \
204 COMMS_FIELD_ACC_FUNC(T_, t_, n_) \
205 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_53(T_, t_, __VA_ARGS__))
206#define COMMS_FIELD_ACC_FUNC_55(T_, t_, n_, ...) \
207 COMMS_FIELD_ACC_FUNC(T_, t_, n_) \
208 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_54(T_, t_, __VA_ARGS__))
209#define COMMS_FIELD_ACC_FUNC_56(T_, t_, n_, ...) \
210 COMMS_FIELD_ACC_FUNC(T_, t_, n_) \
211 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_55(T_, t_, __VA_ARGS__))
212#define COMMS_FIELD_ACC_FUNC_57(T_, t_, n_, ...) \
213 COMMS_FIELD_ACC_FUNC(T_, t_, n_) \
214 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_56(T_, t_, __VA_ARGS__))
215#define COMMS_FIELD_ACC_FUNC_58(T_, t_, n_, ...) \
216 COMMS_FIELD_ACC_FUNC(T_, t_, n_) \
217 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_57(T_, t_, __VA_ARGS__))
218#define COMMS_FIELD_ACC_FUNC_59(T_, t_, n_, ...) \
219 COMMS_FIELD_ACC_FUNC(T_, t_, n_) \
220 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_58(T_, t_, __VA_ARGS__))
221#define COMMS_FIELD_ACC_FUNC_60(T_, t_, n_, ...) \
222 COMMS_FIELD_ACC_FUNC(T_, t_, n_) \
223 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_59(T_, t_, __VA_ARGS__))
224#define COMMS_FIELD_ACC_FUNC_61(T_, t_, n_, ...) \
225 COMMS_FIELD_ACC_FUNC(T_, t_, n_) \
226 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_60(T_, t_, __VA_ARGS__))
227#define COMMS_FIELD_ACC_FUNC_62(T_, t_, n_, ...) \
228 COMMS_FIELD_ACC_FUNC(T_, t_, n_) \
229 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_61(T_, t_, __VA_ARGS__))
230#define COMMS_FIELD_ACC_FUNC_63(T_, t_, n_, ...) \
231 COMMS_FIELD_ACC_FUNC(T_, t_, n_) \
232 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_62(T_, t_, __VA_ARGS__))
233#define COMMS_FIELD_ACC_FUNC_64(T_, t_, n_, ...) \
234 COMMS_FIELD_ACC_FUNC(T_, t_, n_) \
235 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_63(T_, t_, __VA_ARGS__))
236#define COMMS_FIELD_ACC_FUNC_65(T_, t_, n_, ...) \
237 COMMS_FIELD_ACC_FUNC(T_, t_, n_) \
238 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_64(T_, t_, __VA_ARGS__))
239#define COMMS_FIELD_ACC_FUNC_66(T_, t_, n_, ...) \
240 COMMS_FIELD_ACC_FUNC(T_, t_, n_) \
241 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_65(T_, t_, __VA_ARGS__))
242#define COMMS_FIELD_ACC_FUNC_67(T_, t_, n_, ...) \
243 COMMS_FIELD_ACC_FUNC(T_, t_, n_) \
244 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_66(T_, t_, __VA_ARGS__))
245#define COMMS_FIELD_ACC_FUNC_68(T_, t_, n_, ...) \
246 COMMS_FIELD_ACC_FUNC(T_, t_, n_) \
247 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_67(T_, t_, __VA_ARGS__))
248#define COMMS_FIELD_ACC_FUNC_69(T_, t_, n_, ...) \
249 COMMS_FIELD_ACC_FUNC(T_, t_, n_) \
250 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_68(T_, t_, __VA_ARGS__))
251#define COMMS_FIELD_ACC_FUNC_70(T_, t_, n_, ...) \
252 COMMS_FIELD_ACC_FUNC(T_, t_, n_) \
253 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_69(T_, t_, __VA_ARGS__))
254#define COMMS_FIELD_ACC_FUNC_71(T_, t_, n_, ...) \
255 COMMS_FIELD_ACC_FUNC(T_, t_, n_) \
256 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_70(T_, t_, __VA_ARGS__))
257#define COMMS_FIELD_ACC_FUNC_72(T_, t_, n_, ...) \
258 COMMS_FIELD_ACC_FUNC(T_, t_, n_) \
259 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_71(T_, t_, __VA_ARGS__))
260#define COMMS_FIELD_ACC_FUNC_73(T_, t_, n_, ...) \
261 COMMS_FIELD_ACC_FUNC(T_, t_, n_) \
262 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_72(T_, t_, __VA_ARGS__))
263#define COMMS_FIELD_ACC_FUNC_74(T_, t_, n_, ...) \
264 COMMS_FIELD_ACC_FUNC(T_, t_, n_) \
265 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_73(T_, t_, __VA_ARGS__))
266#define COMMS_FIELD_ACC_FUNC_75(T_, t_, n_, ...) \
267 COMMS_FIELD_ACC_FUNC(T_, t_, n_) \
268 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_74(T_, t_, __VA_ARGS__))
269#define COMMS_FIELD_ACC_FUNC_76(T_, t_, n_, ...) \
270 COMMS_FIELD_ACC_FUNC(T_, t_, n_) \
271 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_75(T_, t_, __VA_ARGS__))
272#define COMMS_FIELD_ACC_FUNC_77(T_, t_, n_, ...) \
273 COMMS_FIELD_ACC_FUNC(T_, t_, n_) \
274 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_76(T_, t_, __VA_ARGS__))
275#define COMMS_FIELD_ACC_FUNC_78(T_, t_, n_, ...) \
276 COMMS_FIELD_ACC_FUNC(T_, t_, n_) \
277 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_77(T_, t_, __VA_ARGS__))
278#define COMMS_FIELD_ACC_FUNC_79(T_, t_, n_, ...) \
279 COMMS_FIELD_ACC_FUNC(T_, t_, n_) \
280 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_78(T_, t_, __VA_ARGS__))
281#define COMMS_FIELD_ACC_FUNC_80(T_, t_, n_, ...) \
282 COMMS_FIELD_ACC_FUNC(T_, t_, n_) \
283 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_79(T_, t_, __VA_ARGS__))
284#define COMMS_FIELD_ACC_FUNC_81(T_, t_, n_, ...) \
285 COMMS_FIELD_ACC_FUNC(T_, t_, n_) \
286 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_80(T_, t_, __VA_ARGS__))
287#define COMMS_FIELD_ACC_FUNC_82(T_, t_, n_, ...) \
288 COMMS_FIELD_ACC_FUNC(T_, t_, n_) \
289 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_81(T_, t_, __VA_ARGS__))
290#define COMMS_FIELD_ACC_FUNC_83(T_, t_, n_, ...) \
291 COMMS_FIELD_ACC_FUNC(T_, t_, n_) \
292 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_82(T_, t_, __VA_ARGS__))
293#define COMMS_FIELD_ACC_FUNC_84(T_, t_, n_, ...) \
294 COMMS_FIELD_ACC_FUNC(T_, t_, n_) \
295 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_83(T_, t_, __VA_ARGS__))
296#define COMMS_FIELD_ACC_FUNC_85(T_, t_, n_, ...) \
297 COMMS_FIELD_ACC_FUNC(T_, t_, n_) \
298 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_84(T_, t_, __VA_ARGS__))
299#define COMMS_FIELD_ACC_FUNC_86(T_, t_, n_, ...) \
300 COMMS_FIELD_ACC_FUNC(T_, t_, n_) \
301 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_85(T_, t_, __VA_ARGS__))
302#define COMMS_FIELD_ACC_FUNC_87(T_, t_, n_, ...) \
303 COMMS_FIELD_ACC_FUNC(T_, t_, n_) \
304 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_86(T_, t_, __VA_ARGS__))
305#define COMMS_FIELD_ACC_FUNC_88(T_, t_, n_, ...) \
306 COMMS_FIELD_ACC_FUNC(T_, t_, n_) \
307 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_87(T_, t_, __VA_ARGS__))
308#define COMMS_FIELD_ACC_FUNC_89(T_, t_, n_, ...) \
309 COMMS_FIELD_ACC_FUNC(T_, t_, n_) \
310 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_88(T_, t_, __VA_ARGS__))
311#define COMMS_FIELD_ACC_FUNC_90(T_, t_, n_, ...) \
312 COMMS_FIELD_ACC_FUNC(T_, t_, n_) \
313 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_89(T_, t_, __VA_ARGS__))
314#define COMMS_FIELD_ACC_FUNC_91(T_, t_, n_, ...) \
315 COMMS_FIELD_ACC_FUNC(T_, t_, n_) \
316 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_90(T_, t_, __VA_ARGS__))
317#define COMMS_FIELD_ACC_FUNC_92(T_, t_, n_, ...) \
318 COMMS_FIELD_ACC_FUNC(T_, t_, n_) \
319 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_91(T_, t_, __VA_ARGS__))
320#define COMMS_FIELD_ACC_FUNC_93(T_, t_, n_, ...) \
321 COMMS_FIELD_ACC_FUNC(T_, t_, n_) \
322 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_92(T_, t_, __VA_ARGS__))
323#define COMMS_FIELD_ACC_FUNC_94(T_, t_, n_, ...) \
324 COMMS_FIELD_ACC_FUNC(T_, t_, n_) \
325 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_93(T_, t_, __VA_ARGS__))
326#define COMMS_FIELD_ACC_FUNC_95(T_, t_, n_, ...) \
327 COMMS_FIELD_ACC_FUNC(T_, t_, n_) \
328 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_94(T_, t_, __VA_ARGS__))
329#define COMMS_FIELD_ACC_FUNC_96(T_, t_, n_, ...) \
330 COMMS_FIELD_ACC_FUNC(T_, t_, n_) \
331 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_95(T_, t_, __VA_ARGS__))
332#define COMMS_FIELD_ACC_FUNC_97(T_, t_, n_, ...) \
333 COMMS_FIELD_ACC_FUNC(T_, t_, n_) \
334 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_96(T_, t_, __VA_ARGS__))
335#define COMMS_FIELD_ACC_FUNC_98(T_, t_, n_, ...) \
336 COMMS_FIELD_ACC_FUNC(T_, t_, n_) \
337 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_97(T_, t_, __VA_ARGS__))
338#define COMMS_FIELD_ACC_FUNC_99(T_, t_, n_, ...) \
339 COMMS_FIELD_ACC_FUNC(T_, t_, n_) \
340 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_98(T_, t_, __VA_ARGS__))
341#define COMMS_FIELD_ACC_FUNC_100(T_, t_, n_, ...) \
342 COMMS_FIELD_ACC_FUNC(T_, t_, n_) \
343 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_99(T_, t_, __VA_ARGS__))
344
345#define COMMS_CHOOSE_FIELD_ACC_FUNC_(N, T_, t_, ...) COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_ ## N(T_, t_, __VA_ARGS__))
346#define COMMS_CHOOSE_FIELD_ACC_FUNC(N, T_, t_, ...) COMMS_EXPAND(COMMS_CHOOSE_FIELD_ACC_FUNC_(N, T_, t_, __VA_ARGS__))
347#define COMMS_DO_FIELD_ACC_FUNC(T_, t_, ...) \
348 COMMS_EXPAND(COMMS_CHOOSE_FIELD_ACC_FUNC(COMMS_NUM_ARGS(__VA_ARGS__), T_, t_, __VA_ARGS__))
349
350#define COMMS_DEFINE_FIELD_ENUM(...) COMMS_EXPAND(COMMS_DEFINE_ENUM(FieldIdx, __VA_ARGS__));
351
352// ----------------------------------------------
353
354#define COMMS_FIELD_ACC_FUNC_NOTEMPLATE(n_) \
355 typename std::tuple_element<COMMS_CONCATENATE(FieldIdx_, n_), ValueType>::type& COMMS_CONCATENATE(field_, n_)() {\
356 return std::get<COMMS_CONCATENATE(FieldIdx_, n_)>(value()); \
357 } \
358 const typename std::tuple_element<COMMS_CONCATENATE(FieldIdx_, n_), ValueType>::type& COMMS_CONCATENATE(field_, n_)() const {\
359 return std::get<COMMS_CONCATENATE(FieldIdx_, n_)>(value()); \
360 }
361
362#define COMMS_FIELD_ACC_FUNC_NOTEMPLATE_1(n_) COMMS_FIELD_ACC_FUNC_NOTEMPLATE(n_)
363#define COMMS_FIELD_ACC_FUNC_NOTEMPLATE_2(n_, ...) \
364 COMMS_FIELD_ACC_FUNC_NOTEMPLATE(n_) \
365 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_NOTEMPLATE_1(__VA_ARGS__))
366#define COMMS_FIELD_ACC_FUNC_NOTEMPLATE_3(n_, ...) \
367 COMMS_FIELD_ACC_FUNC_NOTEMPLATE(n_) \
368 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_NOTEMPLATE_2(__VA_ARGS__))
369#define COMMS_FIELD_ACC_FUNC_NOTEMPLATE_4(n_, ...) \
370 COMMS_FIELD_ACC_FUNC_NOTEMPLATE(n_) \
371 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_NOTEMPLATE_3(__VA_ARGS__))
372#define COMMS_FIELD_ACC_FUNC_NOTEMPLATE_5(n_, ...) \
373 COMMS_FIELD_ACC_FUNC_NOTEMPLATE(n_) \
374 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_NOTEMPLATE_4(__VA_ARGS__))
375#define COMMS_FIELD_ACC_FUNC_NOTEMPLATE_6(n_, ...) \
376 COMMS_FIELD_ACC_FUNC_NOTEMPLATE(n_) \
377 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_NOTEMPLATE_5(__VA_ARGS__))
378#define COMMS_FIELD_ACC_FUNC_NOTEMPLATE_7(n_, ...) \
379 COMMS_FIELD_ACC_FUNC_NOTEMPLATE(n_) \
380 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_NOTEMPLATE_6(__VA_ARGS__))
381#define COMMS_FIELD_ACC_FUNC_NOTEMPLATE_8(n_, ...) \
382 COMMS_FIELD_ACC_FUNC_NOTEMPLATE(n_) \
383 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_NOTEMPLATE_7(__VA_ARGS__))
384#define COMMS_FIELD_ACC_FUNC_NOTEMPLATE_9(n_, ...) \
385 COMMS_FIELD_ACC_FUNC_NOTEMPLATE(n_) \
386 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_NOTEMPLATE_8(__VA_ARGS__))
387#define COMMS_FIELD_ACC_FUNC_NOTEMPLATE_10(n_, ...) \
388 COMMS_FIELD_ACC_FUNC_NOTEMPLATE(n_) \
389 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_NOTEMPLATE_9(__VA_ARGS__))
390#define COMMS_FIELD_ACC_FUNC_NOTEMPLATE_11(n_, ...) \
391 COMMS_FIELD_ACC_FUNC_NOTEMPLATE(n_) \
392 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_NOTEMPLATE_10(__VA_ARGS__))
393#define COMMS_FIELD_ACC_FUNC_NOTEMPLATE_12(n_, ...) \
394 COMMS_FIELD_ACC_FUNC_NOTEMPLATE(n_) \
395 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_NOTEMPLATE_11(__VA_ARGS__))
396#define COMMS_FIELD_ACC_FUNC_NOTEMPLATE_13(n_, ...) \
397 COMMS_FIELD_ACC_FUNC_NOTEMPLATE(n_) \
398 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_NOTEMPLATE_12(__VA_ARGS__))
399#define COMMS_FIELD_ACC_FUNC_NOTEMPLATE_14(n_, ...) \
400 COMMS_FIELD_ACC_FUNC_NOTEMPLATE(n_) \
401 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_NOTEMPLATE_13(__VA_ARGS__))
402#define COMMS_FIELD_ACC_FUNC_NOTEMPLATE_15(n_, ...) \
403 COMMS_FIELD_ACC_FUNC_NOTEMPLATE(n_) \
404 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_NOTEMPLATE_14(__VA_ARGS__))
405#define COMMS_FIELD_ACC_FUNC_NOTEMPLATE_16(n_, ...) \
406 COMMS_FIELD_ACC_FUNC_NOTEMPLATE(n_) \
407 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_NOTEMPLATE_15(__VA_ARGS__))
408#define COMMS_FIELD_ACC_FUNC_NOTEMPLATE_17(n_, ...) \
409 COMMS_FIELD_ACC_FUNC_NOTEMPLATE(n_) \
410 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_NOTEMPLATE_16(__VA_ARGS__))
411#define COMMS_FIELD_ACC_FUNC_NOTEMPLATE_18(n_, ...) \
412 COMMS_FIELD_ACC_FUNC_NOTEMPLATE(n_) \
413 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_NOTEMPLATE_17(__VA_ARGS__))
414#define COMMS_FIELD_ACC_FUNC_NOTEMPLATE_19(n_, ...) \
415 COMMS_FIELD_ACC_FUNC_NOTEMPLATE(n_) \
416 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_NOTEMPLATE_18(__VA_ARGS__))
417#define COMMS_FIELD_ACC_FUNC_NOTEMPLATE_20(n_, ...) \
418 COMMS_FIELD_ACC_FUNC_NOTEMPLATE(n_) \
419 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_NOTEMPLATE_19(__VA_ARGS__))
420#define COMMS_FIELD_ACC_FUNC_NOTEMPLATE_21(n_, ...) \
421 COMMS_FIELD_ACC_FUNC_NOTEMPLATE(n_) \
422 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_NOTEMPLATE_20(__VA_ARGS__))
423#define COMMS_FIELD_ACC_FUNC_NOTEMPLATE_22(n_, ...) \
424 COMMS_FIELD_ACC_FUNC_NOTEMPLATE(n_) \
425 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_NOTEMPLATE_21(__VA_ARGS__))
426#define COMMS_FIELD_ACC_FUNC_NOTEMPLATE_23(n_, ...) \
427 COMMS_FIELD_ACC_FUNC_NOTEMPLATE(n_) \
428 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_NOTEMPLATE_22(__VA_ARGS__))
429#define COMMS_FIELD_ACC_FUNC_NOTEMPLATE_24(n_, ...) \
430 COMMS_FIELD_ACC_FUNC_NOTEMPLATE(n_) \
431 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_NOTEMPLATE_23(__VA_ARGS__))
432#define COMMS_FIELD_ACC_FUNC_NOTEMPLATE_25(n_, ...) \
433 COMMS_FIELD_ACC_FUNC_NOTEMPLATE(n_) \
434 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_NOTEMPLATE_24(__VA_ARGS__))
435#define COMMS_FIELD_ACC_FUNC_NOTEMPLATE_26(n_, ...) \
436 COMMS_FIELD_ACC_FUNC_NOTEMPLATE(n_) \
437 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_NOTEMPLATE_25(__VA_ARGS__))
438#define COMMS_FIELD_ACC_FUNC_NOTEMPLATE_27(n_, ...) \
439 COMMS_FIELD_ACC_FUNC_NOTEMPLATE(n_) \
440 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_NOTEMPLATE_26(__VA_ARGS__))
441#define COMMS_FIELD_ACC_FUNC_NOTEMPLATE_28(n_, ...) \
442 COMMS_FIELD_ACC_FUNC_NOTEMPLATE(n_) \
443 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_NOTEMPLATE_27(__VA_ARGS__))
444#define COMMS_FIELD_ACC_FUNC_NOTEMPLATE_29(n_, ...) \
445 COMMS_FIELD_ACC_FUNC_NOTEMPLATE(n_) \
446 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_NOTEMPLATE_28(__VA_ARGS__))
447#define COMMS_FIELD_ACC_FUNC_NOTEMPLATE_30(n_, ...) \
448 COMMS_FIELD_ACC_FUNC_NOTEMPLATE(n_) \
449 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_NOTEMPLATE_29(__VA_ARGS__))
450#define COMMS_FIELD_ACC_FUNC_NOTEMPLATE_31(n_, ...) \
451 COMMS_FIELD_ACC_FUNC_NOTEMPLATE(n_) \
452 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_NOTEMPLATE_30(__VA_ARGS__))
453#define COMMS_FIELD_ACC_FUNC_NOTEMPLATE_32(n_, ...) \
454 COMMS_FIELD_ACC_FUNC_NOTEMPLATE(n_) \
455 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_NOTEMPLATE_31(__VA_ARGS__))
456#define COMMS_FIELD_ACC_FUNC_NOTEMPLATE_33(n_, ...) \
457 COMMS_FIELD_ACC_FUNC_NOTEMPLATE(n_) \
458 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_NOTEMPLATE_32(__VA_ARGS__))
459#define COMMS_FIELD_ACC_FUNC_NOTEMPLATE_34(n_, ...) \
460 COMMS_FIELD_ACC_FUNC_NOTEMPLATE(n_) \
461 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_NOTEMPLATE_33(__VA_ARGS__))
462#define COMMS_FIELD_ACC_FUNC_NOTEMPLATE_35(n_, ...) \
463 COMMS_FIELD_ACC_FUNC_NOTEMPLATE(n_) \
464 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_NOTEMPLATE_34(__VA_ARGS__))
465#define COMMS_FIELD_ACC_FUNC_NOTEMPLATE_36(n_, ...) \
466 COMMS_FIELD_ACC_FUNC_NOTEMPLATE(n_) \
467 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_NOTEMPLATE_35(__VA_ARGS__))
468#define COMMS_FIELD_ACC_FUNC_NOTEMPLATE_37(n_, ...) \
469 COMMS_FIELD_ACC_FUNC_NOTEMPLATE(n_) \
470 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_NOTEMPLATE_36(__VA_ARGS__))
471#define COMMS_FIELD_ACC_FUNC_NOTEMPLATE_38(n_, ...) \
472 COMMS_FIELD_ACC_FUNC_NOTEMPLATE(n_) \
473 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_NOTEMPLATE_37(__VA_ARGS__))
474#define COMMS_FIELD_ACC_FUNC_NOTEMPLATE_39(n_, ...) \
475 COMMS_FIELD_ACC_FUNC_NOTEMPLATE(n_) \
476 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_NOTEMPLATE_38(__VA_ARGS__))
477#define COMMS_FIELD_ACC_FUNC_NOTEMPLATE_40(n_, ...) \
478 COMMS_FIELD_ACC_FUNC_NOTEMPLATE(n_) \
479 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_NOTEMPLATE_39(__VA_ARGS__))
480#define COMMS_FIELD_ACC_FUNC_NOTEMPLATE_41(n_, ...) \
481 COMMS_FIELD_ACC_FUNC_NOTEMPLATE(n_) \
482 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_NOTEMPLATE_40(__VA_ARGS__))
483#define COMMS_FIELD_ACC_FUNC_NOTEMPLATE_42(n_, ...) \
484 COMMS_FIELD_ACC_FUNC_NOTEMPLATE(n_) \
485 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_NOTEMPLATE_41(__VA_ARGS__))
486#define COMMS_FIELD_ACC_FUNC_NOTEMPLATE_43(n_, ...) \
487 COMMS_FIELD_ACC_FUNC_NOTEMPLATE(n_) \
488 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_NOTEMPLATE_42(__VA_ARGS__))
489#define COMMS_FIELD_ACC_FUNC_NOTEMPLATE_44(n_, ...) \
490 COMMS_FIELD_ACC_FUNC_NOTEMPLATE(n_) \
491 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_NOTEMPLATE_43(__VA_ARGS__))
492#define COMMS_FIELD_ACC_FUNC_NOTEMPLATE_45(n_, ...) \
493 COMMS_FIELD_ACC_FUNC_NOTEMPLATE(n_) \
494 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_NOTEMPLATE_44(__VA_ARGS__))
495#define COMMS_FIELD_ACC_FUNC_NOTEMPLATE_46(n_, ...) \
496 COMMS_FIELD_ACC_FUNC_NOTEMPLATE(n_) \
497 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_NOTEMPLATE_45(__VA_ARGS__))
498#define COMMS_FIELD_ACC_FUNC_NOTEMPLATE_47(n_, ...) \
499 COMMS_FIELD_ACC_FUNC_NOTEMPLATE(n_) \
500 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_NOTEMPLATE_46(__VA_ARGS__))
501#define COMMS_FIELD_ACC_FUNC_NOTEMPLATE_48(n_, ...) \
502 COMMS_FIELD_ACC_FUNC_NOTEMPLATE(n_) \
503 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_NOTEMPLATE_47(__VA_ARGS__))
504#define COMMS_FIELD_ACC_FUNC_NOTEMPLATE_49(n_, ...) \
505 COMMS_FIELD_ACC_FUNC_NOTEMPLATE(n_) \
506 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_NOTEMPLATE_48(__VA_ARGS__))
507#define COMMS_FIELD_ACC_FUNC_NOTEMPLATE_50(n_, ...) \
508 COMMS_FIELD_ACC_FUNC_NOTEMPLATE(n_) \
509 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_NOTEMPLATE_49(__VA_ARGS__))
510#define COMMS_FIELD_ACC_FUNC_NOTEMPLATE_51(n_, ...) \
511 COMMS_FIELD_ACC_FUNC_NOTEMPLATE(n_) \
512 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_NOTEMPLATE_50(__VA_ARGS__))
513#define COMMS_FIELD_ACC_FUNC_NOTEMPLATE_52(n_, ...) \
514 COMMS_FIELD_ACC_FUNC_NOTEMPLATE(n_) \
515 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_NOTEMPLATE_51(__VA_ARGS__))
516#define COMMS_FIELD_ACC_FUNC_NOTEMPLATE_53(n_, ...) \
517 COMMS_FIELD_ACC_FUNC_NOTEMPLATE(n_) \
518 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_NOTEMPLATE_52(__VA_ARGS__))
519#define COMMS_FIELD_ACC_FUNC_NOTEMPLATE_54(n_, ...) \
520 COMMS_FIELD_ACC_FUNC_NOTEMPLATE(n_) \
521 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_NOTEMPLATE_53(__VA_ARGS__))
522#define COMMS_FIELD_ACC_FUNC_NOTEMPLATE_55(n_, ...) \
523 COMMS_FIELD_ACC_FUNC_NOTEMPLATE(n_) \
524 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_NOTEMPLATE_54(__VA_ARGS__))
525#define COMMS_FIELD_ACC_FUNC_NOTEMPLATE_56(n_, ...) \
526 COMMS_FIELD_ACC_FUNC_NOTEMPLATE(n_) \
527 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_NOTEMPLATE_55(__VA_ARGS__))
528#define COMMS_FIELD_ACC_FUNC_NOTEMPLATE_57(n_, ...) \
529 COMMS_FIELD_ACC_FUNC_NOTEMPLATE(n_) \
530 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_NOTEMPLATE_56(__VA_ARGS__))
531#define COMMS_FIELD_ACC_FUNC_NOTEMPLATE_58(n_, ...) \
532 COMMS_FIELD_ACC_FUNC_NOTEMPLATE(n_) \
533 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_NOTEMPLATE_57(__VA_ARGS__))
534#define COMMS_FIELD_ACC_FUNC_NOTEMPLATE_59(n_, ...) \
535 COMMS_FIELD_ACC_FUNC_NOTEMPLATE(n_) \
536 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_NOTEMPLATE_58(__VA_ARGS__))
537#define COMMS_FIELD_ACC_FUNC_NOTEMPLATE_60(n_, ...) \
538 COMMS_FIELD_ACC_FUNC_NOTEMPLATE(n_) \
539 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_NOTEMPLATE_59(__VA_ARGS__))
540#define COMMS_FIELD_ACC_FUNC_NOTEMPLATE_61(n_, ...) \
541 COMMS_FIELD_ACC_FUNC_NOTEMPLATE(n_) \
542 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_NOTEMPLATE_60(__VA_ARGS__))
543#define COMMS_FIELD_ACC_FUNC_NOTEMPLATE_62(n_, ...) \
544 COMMS_FIELD_ACC_FUNC_NOTEMPLATE(n_) \
545 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_NOTEMPLATE_61(__VA_ARGS__))
546#define COMMS_FIELD_ACC_FUNC_NOTEMPLATE_63(n_, ...) \
547 COMMS_FIELD_ACC_FUNC_NOTEMPLATE(n_) \
548 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_NOTEMPLATE_62(__VA_ARGS__))
549#define COMMS_FIELD_ACC_FUNC_NOTEMPLATE_64(n_, ...) \
550 COMMS_FIELD_ACC_FUNC_NOTEMPLATE(n_) \
551 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_NOTEMPLATE_63(__VA_ARGS__))
552#define COMMS_FIELD_ACC_FUNC_NOTEMPLATE_65(n_, ...) \
553 COMMS_FIELD_ACC_FUNC_NOTEMPLATE(n_) \
554 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_NOTEMPLATE_64(__VA_ARGS__))
555#define COMMS_FIELD_ACC_FUNC_NOTEMPLATE_66(n_, ...) \
556 COMMS_FIELD_ACC_FUNC_NOTEMPLATE(n_) \
557 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_NOTEMPLATE_65(__VA_ARGS__))
558#define COMMS_FIELD_ACC_FUNC_NOTEMPLATE_67(n_, ...) \
559 COMMS_FIELD_ACC_FUNC_NOTEMPLATE(n_) \
560 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_NOTEMPLATE_66(__VA_ARGS__))
561#define COMMS_FIELD_ACC_FUNC_NOTEMPLATE_68(n_, ...) \
562 COMMS_FIELD_ACC_FUNC_NOTEMPLATE(n_) \
563 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_NOTEMPLATE_67(__VA_ARGS__))
564#define COMMS_FIELD_ACC_FUNC_NOTEMPLATE_69(n_, ...) \
565 COMMS_FIELD_ACC_FUNC_NOTEMPLATE(n_) \
566 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_NOTEMPLATE_68(__VA_ARGS__))
567#define COMMS_FIELD_ACC_FUNC_NOTEMPLATE_70(n_, ...) \
568 COMMS_FIELD_ACC_FUNC_NOTEMPLATE(n_) \
569 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_NOTEMPLATE_69(__VA_ARGS__))
570#define COMMS_FIELD_ACC_FUNC_NOTEMPLATE_71(n_, ...) \
571 COMMS_FIELD_ACC_FUNC_NOTEMPLATE(n_) \
572 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_NOTEMPLATE_70(__VA_ARGS__))
573#define COMMS_FIELD_ACC_FUNC_NOTEMPLATE_72(n_, ...) \
574 COMMS_FIELD_ACC_FUNC_NOTEMPLATE(n_) \
575 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_NOTEMPLATE_71(__VA_ARGS__))
576#define COMMS_FIELD_ACC_FUNC_NOTEMPLATE_73(n_, ...) \
577 COMMS_FIELD_ACC_FUNC_NOTEMPLATE(n_) \
578 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_NOTEMPLATE_72(__VA_ARGS__))
579#define COMMS_FIELD_ACC_FUNC_NOTEMPLATE_74(n_, ...) \
580 COMMS_FIELD_ACC_FUNC_NOTEMPLATE(n_) \
581 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_NOTEMPLATE_73(__VA_ARGS__))
582#define COMMS_FIELD_ACC_FUNC_NOTEMPLATE_75(n_, ...) \
583 COMMS_FIELD_ACC_FUNC_NOTEMPLATE(n_) \
584 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_NOTEMPLATE_74(__VA_ARGS__))
585#define COMMS_FIELD_ACC_FUNC_NOTEMPLATE_76(n_, ...) \
586 COMMS_FIELD_ACC_FUNC_NOTEMPLATE(n_) \
587 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_NOTEMPLATE_75(__VA_ARGS__))
588#define COMMS_FIELD_ACC_FUNC_NOTEMPLATE_77(n_, ...) \
589 COMMS_FIELD_ACC_FUNC_NOTEMPLATE(n_) \
590 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_NOTEMPLATE_76(__VA_ARGS__))
591#define COMMS_FIELD_ACC_FUNC_NOTEMPLATE_78(n_, ...) \
592 COMMS_FIELD_ACC_FUNC_NOTEMPLATE(n_) \
593 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_NOTEMPLATE_77(__VA_ARGS__))
594#define COMMS_FIELD_ACC_FUNC_NOTEMPLATE_79(n_, ...) \
595 COMMS_FIELD_ACC_FUNC_NOTEMPLATE(n_) \
596 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_NOTEMPLATE_78(__VA_ARGS__))
597#define COMMS_FIELD_ACC_FUNC_NOTEMPLATE_80(n_, ...) \
598 COMMS_FIELD_ACC_FUNC_NOTEMPLATE(n_) \
599 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_NOTEMPLATE_79(__VA_ARGS__))
600#define COMMS_FIELD_ACC_FUNC_NOTEMPLATE_81(n_, ...) \
601 COMMS_FIELD_ACC_FUNC_NOTEMPLATE(n_) \
602 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_NOTEMPLATE_80(__VA_ARGS__))
603#define COMMS_FIELD_ACC_FUNC_NOTEMPLATE_82(n_, ...) \
604 COMMS_FIELD_ACC_FUNC_NOTEMPLATE(n_) \
605 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_NOTEMPLATE_81(__VA_ARGS__))
606#define COMMS_FIELD_ACC_FUNC_NOTEMPLATE_83(n_, ...) \
607 COMMS_FIELD_ACC_FUNC_NOTEMPLATE(n_) \
608 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_NOTEMPLATE_82(__VA_ARGS__))
609#define COMMS_FIELD_ACC_FUNC_NOTEMPLATE_84(n_, ...) \
610 COMMS_FIELD_ACC_FUNC_NOTEMPLATE(n_) \
611 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_NOTEMPLATE_83(__VA_ARGS__))
612#define COMMS_FIELD_ACC_FUNC_NOTEMPLATE_85(n_, ...) \
613 COMMS_FIELD_ACC_FUNC_NOTEMPLATE(n_) \
614 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_NOTEMPLATE_84(__VA_ARGS__))
615#define COMMS_FIELD_ACC_FUNC_NOTEMPLATE_86(n_, ...) \
616 COMMS_FIELD_ACC_FUNC_NOTEMPLATE(n_) \
617 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_NOTEMPLATE_85(__VA_ARGS__))
618#define COMMS_FIELD_ACC_FUNC_NOTEMPLATE_87(n_, ...) \
619 COMMS_FIELD_ACC_FUNC_NOTEMPLATE(n_) \
620 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_NOTEMPLATE_86(__VA_ARGS__))
621#define COMMS_FIELD_ACC_FUNC_NOTEMPLATE_88(n_, ...) \
622 COMMS_FIELD_ACC_FUNC_NOTEMPLATE(n_) \
623 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_NOTEMPLATE_87(__VA_ARGS__))
624#define COMMS_FIELD_ACC_FUNC_NOTEMPLATE_89(n_, ...) \
625 COMMS_FIELD_ACC_FUNC_NOTEMPLATE(n_) \
626 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_NOTEMPLATE_88(__VA_ARGS__))
627#define COMMS_FIELD_ACC_FUNC_NOTEMPLATE_90(n_, ...) \
628 COMMS_FIELD_ACC_FUNC_NOTEMPLATE(n_) \
629 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_NOTEMPLATE_89(__VA_ARGS__))
630#define COMMS_FIELD_ACC_FUNC_NOTEMPLATE_91(n_, ...) \
631 COMMS_FIELD_ACC_FUNC_NOTEMPLATE(n_) \
632 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_NOTEMPLATE_90(__VA_ARGS__))
633#define COMMS_FIELD_ACC_FUNC_NOTEMPLATE_92(n_, ...) \
634 COMMS_FIELD_ACC_FUNC_NOTEMPLATE(n_) \
635 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_NOTEMPLATE_91(__VA_ARGS__))
636#define COMMS_FIELD_ACC_FUNC_NOTEMPLATE_93(n_, ...) \
637 COMMS_FIELD_ACC_FUNC_NOTEMPLATE(n_) \
638 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_NOTEMPLATE_92(__VA_ARGS__))
639#define COMMS_FIELD_ACC_FUNC_NOTEMPLATE_94(n_, ...) \
640 COMMS_FIELD_ACC_FUNC_NOTEMPLATE(n_) \
641 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_NOTEMPLATE_93(__VA_ARGS__))
642#define COMMS_FIELD_ACC_FUNC_NOTEMPLATE_95(n_, ...) \
643 COMMS_FIELD_ACC_FUNC_NOTEMPLATE(n_) \
644 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_NOTEMPLATE_94(__VA_ARGS__))
645#define COMMS_FIELD_ACC_FUNC_NOTEMPLATE_96(n_, ...) \
646 COMMS_FIELD_ACC_FUNC_NOTEMPLATE(n_) \
647 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_NOTEMPLATE_95(__VA_ARGS__))
648#define COMMS_FIELD_ACC_FUNC_NOTEMPLATE_97(n_, ...) \
649 COMMS_FIELD_ACC_FUNC_NOTEMPLATE(n_) \
650 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_NOTEMPLATE_96(__VA_ARGS__))
651#define COMMS_FIELD_ACC_FUNC_NOTEMPLATE_98(n_, ...) \
652 COMMS_FIELD_ACC_FUNC_NOTEMPLATE(n_) \
653 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_NOTEMPLATE_97(__VA_ARGS__))
654#define COMMS_FIELD_ACC_FUNC_NOTEMPLATE_99(n_, ...) \
655 COMMS_FIELD_ACC_FUNC_NOTEMPLATE(n_) \
656 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_NOTEMPLATE_98(__VA_ARGS__))
657#define COMMS_FIELD_ACC_FUNC_NOTEMPLATE_100(n_, ...) \
658 COMMS_FIELD_ACC_FUNC_NOTEMPLATE(n_) \
659 COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_NOTEMPLATE_99(__VA_ARGS__))
660
661
662#define COMMS_CHOOSE_FIELD_ACC_FUNC_NOTEMPLATE_(N, ...) COMMS_EXPAND(COMMS_FIELD_ACC_FUNC_NOTEMPLATE_ ## N(__VA_ARGS__))
663#define COMMS_CHOOSE_FIELD_ACC_FUNC_NOTEMPLATE(N, ...) COMMS_EXPAND(COMMS_CHOOSE_FIELD_ACC_FUNC_NOTEMPLATE_(N, __VA_ARGS__))
664#define COMMS_DO_FIELD_ACC_FUNC_NOTEMPLATE(...) \
665 COMMS_EXPAND(COMMS_CHOOSE_FIELD_ACC_FUNC_NOTEMPLATE(COMMS_NUM_ARGS(__VA_ARGS__), __VA_ARGS__))
666
667
668// ----------------------------------------------
669
670#define COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
671 using COMMS_CONCATENATE(P_, n_) = typename std::tuple_element<COMMS_CONCATENATE(pref_, n_), T_>::type;
672
673#define COMMS_FIELD_TYPEDEF_1(T_, P_, pref_, n_) COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_)
674#define COMMS_FIELD_TYPEDEF_2(T_, P_, pref_, n_, ...) \
675 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
676 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_1(T_, P_, pref_, __VA_ARGS__))
677#define COMMS_FIELD_TYPEDEF_3(T_, P_, pref_, n_, ...) \
678 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
679 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_2(T_, P_, pref_, __VA_ARGS__))
680#define COMMS_FIELD_TYPEDEF_4(T_, P_, pref_, n_, ...) \
681 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
682 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_3(T_, P_, pref_, __VA_ARGS__))
683#define COMMS_FIELD_TYPEDEF_5(T_, P_, pref_, n_, ...) \
684 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
685 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_4(T_, P_, pref_, __VA_ARGS__))
686#define COMMS_FIELD_TYPEDEF_6(T_, P_, pref_, n_, ...) \
687 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
688 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_5(T_, P_, pref_, __VA_ARGS__))
689#define COMMS_FIELD_TYPEDEF_7(T_, P_, pref_, n_, ...) \
690 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
691 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_6(T_, P_, pref_, __VA_ARGS__))
692#define COMMS_FIELD_TYPEDEF_8(T_, P_, pref_, n_, ...) \
693 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
694 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_7(T_, P_, pref_, __VA_ARGS__))
695#define COMMS_FIELD_TYPEDEF_9(T_, P_, pref_, n_, ...) \
696 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
697 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_8(T_, P_, pref_, __VA_ARGS__))
698#define COMMS_FIELD_TYPEDEF_10(T_, P_, pref_, n_, ...) \
699 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
700 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_9(T_, P_, pref_, __VA_ARGS__))
701#define COMMS_FIELD_TYPEDEF_11(T_, P_, pref_, n_, ...) \
702 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
703 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_10(T_, P_, pref_, __VA_ARGS__))
704#define COMMS_FIELD_TYPEDEF_12(T_, P_, pref_, n_, ...) \
705 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
706 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_11(T_, P_, pref_, __VA_ARGS__))
707#define COMMS_FIELD_TYPEDEF_13(T_, P_, pref_, n_, ...) \
708 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
709 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_12(T_, P_, pref_, __VA_ARGS__))
710#define COMMS_FIELD_TYPEDEF_14(T_, P_, pref_, n_, ...) \
711 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
712 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_13(T_, P_, pref_, __VA_ARGS__))
713#define COMMS_FIELD_TYPEDEF_15(T_, P_, pref_, n_, ...) \
714 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
715 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_14(T_, P_, pref_, __VA_ARGS__))
716#define COMMS_FIELD_TYPEDEF_16(T_, P_, pref_, n_, ...) \
717 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
718 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_15(T_, P_, pref_, __VA_ARGS__))
719#define COMMS_FIELD_TYPEDEF_17(T_, P_, pref_, n_, ...) \
720 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
721 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_16(T_, P_, pref_, __VA_ARGS__))
722#define COMMS_FIELD_TYPEDEF_18(T_, P_, pref_, n_, ...) \
723 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
724 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_17(T_, P_, pref_, __VA_ARGS__))
725#define COMMS_FIELD_TYPEDEF_19(T_, P_, pref_, n_, ...) \
726 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
727 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_18(T_, P_, pref_, __VA_ARGS__))
728#define COMMS_FIELD_TYPEDEF_20(T_, P_, pref_, n_, ...) \
729 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
730 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_19(T_, P_, pref_, __VA_ARGS__))
731#define COMMS_FIELD_TYPEDEF_21(T_, P_, pref_, n_, ...) \
732 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
733 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_20(T_, P_, pref_, __VA_ARGS__))
734#define COMMS_FIELD_TYPEDEF_22(T_, P_, pref_, n_, ...) \
735 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
736 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_21(T_, P_, pref_, __VA_ARGS__))
737#define COMMS_FIELD_TYPEDEF_23(T_, P_, pref_, n_, ...) \
738 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
739 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_22(T_, P_, pref_, __VA_ARGS__))
740#define COMMS_FIELD_TYPEDEF_24(T_, P_, pref_, n_, ...) \
741 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
742 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_23(T_, P_, pref_, __VA_ARGS__))
743#define COMMS_FIELD_TYPEDEF_25(T_, P_, pref_, n_, ...) \
744 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
745 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_24(T_, P_, pref_, __VA_ARGS__))
746#define COMMS_FIELD_TYPEDEF_26(T_, P_, pref_, n_, ...) \
747 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
748 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_25(T_, P_, pref_, __VA_ARGS__))
749#define COMMS_FIELD_TYPEDEF_27(T_, P_, pref_, n_, ...) \
750 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
751 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_26(T_, P_, pref_, __VA_ARGS__))
752#define COMMS_FIELD_TYPEDEF_28(T_, P_, pref_, n_, ...) \
753 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
754 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_27(T_, P_, pref_, __VA_ARGS__))
755#define COMMS_FIELD_TYPEDEF_29(T_, P_, pref_, n_, ...) \
756 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
757 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_28(T_, P_, pref_, __VA_ARGS__))
758#define COMMS_FIELD_TYPEDEF_30(T_, P_, pref_, n_, ...) \
759 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
760 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_29(T_, P_, pref_, __VA_ARGS__))
761#define COMMS_FIELD_TYPEDEF_31(T_, P_, pref_, n_, ...) \
762 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
763 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_30(T_, P_, pref_, __VA_ARGS__))
764#define COMMS_FIELD_TYPEDEF_32(T_, P_, pref_, n_, ...) \
765 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
766 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_31(T_, P_, pref_, __VA_ARGS__))
767#define COMMS_FIELD_TYPEDEF_33(T_, P_, pref_, n_, ...) \
768 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
769 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_32(T_, P_, pref_, __VA_ARGS__))
770#define COMMS_FIELD_TYPEDEF_34(T_, P_, pref_, n_, ...) \
771 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
772 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_33(T_, P_, pref_, __VA_ARGS__))
773#define COMMS_FIELD_TYPEDEF_35(T_, P_, pref_, n_, ...) \
774 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
775 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_34(T_, P_, pref_, __VA_ARGS__))
776#define COMMS_FIELD_TYPEDEF_36(T_, P_, pref_, n_, ...) \
777 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
778 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_35(T_, P_, pref_, __VA_ARGS__))
779#define COMMS_FIELD_TYPEDEF_37(T_, P_, pref_, n_, ...) \
780 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
781 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_36(T_, P_, pref_, __VA_ARGS__))
782#define COMMS_FIELD_TYPEDEF_38(T_, P_, pref_, n_, ...) \
783 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
784 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_37(T_, P_, pref_, __VA_ARGS__))
785#define COMMS_FIELD_TYPEDEF_39(T_, P_, pref_, n_, ...) \
786 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
787 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_38(T_, P_, pref_, __VA_ARGS__))
788#define COMMS_FIELD_TYPEDEF_40(T_, P_, pref_, n_, ...) \
789 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
790 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_39(T_, P_, pref_, __VA_ARGS__))
791#define COMMS_FIELD_TYPEDEF_41(T_, P_, pref_, n_, ...) \
792 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
793 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_40(T_, P_, pref_, __VA_ARGS__))
794#define COMMS_FIELD_TYPEDEF_42(T_, P_, pref_, n_, ...) \
795 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
796 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_41(T_, P_, pref_, __VA_ARGS__))
797#define COMMS_FIELD_TYPEDEF_43(T_, P_, pref_, n_, ...) \
798 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
799 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_42(T_, P_, pref_, __VA_ARGS__))
800#define COMMS_FIELD_TYPEDEF_44(T_, P_, pref_, n_, ...) \
801 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
802 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_43(T_, P_, pref_, __VA_ARGS__))
803#define COMMS_FIELD_TYPEDEF_45(T_, P_, pref_, n_, ...) \
804 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
805 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_44(T_, P_, pref_, __VA_ARGS__))
806#define COMMS_FIELD_TYPEDEF_46(T_, P_, pref_, n_, ...) \
807 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
808 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_45(T_, P_, pref_, __VA_ARGS__))
809#define COMMS_FIELD_TYPEDEF_47(T_, P_, pref_, n_, ...) \
810 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
811 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_46(T_, P_, pref_, __VA_ARGS__))
812#define COMMS_FIELD_TYPEDEF_48(T_, P_, pref_, n_, ...) \
813 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
814 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_47(T_, P_, pref_, __VA_ARGS__))
815#define COMMS_FIELD_TYPEDEF_49(T_, P_, pref_, n_, ...) \
816 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
817 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_48(T_, P_, pref_, __VA_ARGS__))
818#define COMMS_FIELD_TYPEDEF_50(T_, P_, pref_, n_, ...) \
819 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
820 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_49(T_, P_, pref_, __VA_ARGS__))
821#define COMMS_FIELD_TYPEDEF_51(T_, P_, pref_, n_, ...) \
822 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
823 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_50(T_, P_, pref_, __VA_ARGS__))
824#define COMMS_FIELD_TYPEDEF_52(T_, P_, pref_, n_, ...) \
825 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
826 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_51(T_, P_, pref_, __VA_ARGS__))
827#define COMMS_FIELD_TYPEDEF_53(T_, P_, pref_, n_, ...) \
828 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
829 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_52(T_, P_, pref_, __VA_ARGS__))
830#define COMMS_FIELD_TYPEDEF_54(T_, P_, pref_, n_, ...) \
831 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
832 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_53(T_, P_, pref_, __VA_ARGS__))
833#define COMMS_FIELD_TYPEDEF_55(T_, P_, pref_, n_, ...) \
834 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
835 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_54(T_, P_, pref_, __VA_ARGS__))
836#define COMMS_FIELD_TYPEDEF_56(T_, P_, pref_, n_, ...) \
837 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
838 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_55(T_, P_, pref_, __VA_ARGS__))
839#define COMMS_FIELD_TYPEDEF_57(T_, P_, pref_, n_, ...) \
840 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
841 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_56(T_, P_, pref_, __VA_ARGS__))
842#define COMMS_FIELD_TYPEDEF_58(T_, P_, pref_, n_, ...) \
843 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
844 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_57(T_, P_, pref_, __VA_ARGS__))
845#define COMMS_FIELD_TYPEDEF_59(T_, P_, pref_, n_, ...) \
846 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
847 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_58(T_, P_, pref_, __VA_ARGS__))
848#define COMMS_FIELD_TYPEDEF_60(T_, P_, pref_, n_, ...) \
849 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
850 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_59(T_, P_, pref_, __VA_ARGS__))
851#define COMMS_FIELD_TYPEDEF_61(T_, P_, pref_, n_, ...) \
852 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
853 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_60(T_, P_, pref_, __VA_ARGS__))
854#define COMMS_FIELD_TYPEDEF_62(T_, P_, pref_, n_, ...) \
855 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
856 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_61(T_, P_, pref_, __VA_ARGS__))
857#define COMMS_FIELD_TYPEDEF_63(T_, P_, pref_, n_, ...) \
858 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
859 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_62(T_, P_, pref_, __VA_ARGS__))
860#define COMMS_FIELD_TYPEDEF_64(T_, P_, pref_, n_, ...) \
861 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
862 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_63(T_, P_, pref_, __VA_ARGS__))
863#define COMMS_FIELD_TYPEDEF_65(T_, P_, pref_, n_, ...) \
864 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
865 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_64(T_, P_, pref_, __VA_ARGS__))
866#define COMMS_FIELD_TYPEDEF_66(T_, P_, pref_, n_, ...) \
867 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
868 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_65(T_, P_, pref_, __VA_ARGS__))
869#define COMMS_FIELD_TYPEDEF_67(T_, P_, pref_, n_, ...) \
870 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
871 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_66(T_, P_, pref_, __VA_ARGS__))
872#define COMMS_FIELD_TYPEDEF_68(T_, P_, pref_, n_, ...) \
873 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
874 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_67(T_, P_, pref_, __VA_ARGS__))
875#define COMMS_FIELD_TYPEDEF_69(T_, P_, pref_, n_, ...) \
876 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
877 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_68(T_, P_, pref_, __VA_ARGS__))
878#define COMMS_FIELD_TYPEDEF_70(T_, P_, pref_, n_, ...) \
879 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
880 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_69(T_, P_, pref_, __VA_ARGS__))
881#define COMMS_FIELD_TYPEDEF_71(T_, P_, pref_, n_, ...) \
882 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
883 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_70(T_, P_, pref_, __VA_ARGS__))
884#define COMMS_FIELD_TYPEDEF_72(T_, P_, pref_, n_, ...) \
885 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
886 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_71(T_, P_, pref_, __VA_ARGS__))
887#define COMMS_FIELD_TYPEDEF_73(T_, P_, pref_, n_, ...) \
888 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
889 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_72(T_, P_, pref_, __VA_ARGS__))
890#define COMMS_FIELD_TYPEDEF_74(T_, P_, pref_, n_, ...) \
891 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
892 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_73(T_, P_, pref_, __VA_ARGS__))
893#define COMMS_FIELD_TYPEDEF_75(T_, P_, pref_, n_, ...) \
894 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
895 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_74(T_, P_, pref_, __VA_ARGS__))
896#define COMMS_FIELD_TYPEDEF_76(T_, P_, pref_, n_, ...) \
897 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
898 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_75(T_, P_, pref_, __VA_ARGS__))
899#define COMMS_FIELD_TYPEDEF_77(T_, P_, pref_, n_, ...) \
900 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
901 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_76(T_, P_, pref_, __VA_ARGS__))
902#define COMMS_FIELD_TYPEDEF_78(T_, P_, pref_, n_, ...) \
903 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
904 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_77(T_, P_, pref_, __VA_ARGS__))
905#define COMMS_FIELD_TYPEDEF_79(T_, P_, pref_, n_, ...) \
906 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
907 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_78(T_, P_, pref_, __VA_ARGS__))
908#define COMMS_FIELD_TYPEDEF_80(T_, P_, pref_, n_, ...) \
909 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
910 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_79(T_, P_, pref_, __VA_ARGS__))
911#define COMMS_FIELD_TYPEDEF_81(T_, P_, pref_, n_, ...) \
912 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
913 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_80(T_, P_, pref_, __VA_ARGS__))
914#define COMMS_FIELD_TYPEDEF_82(T_, P_, pref_, n_, ...) \
915 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
916 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_81(T_, P_, pref_, __VA_ARGS__))
917#define COMMS_FIELD_TYPEDEF_83(T_, P_, pref_, n_, ...) \
918 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
919 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_82(T_, P_, pref_, __VA_ARGS__))
920#define COMMS_FIELD_TYPEDEF_84(T_, P_, pref_, n_, ...) \
921 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
922 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_83(T_, P_, pref_, __VA_ARGS__))
923#define COMMS_FIELD_TYPEDEF_85(T_, P_, pref_, n_, ...) \
924 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
925 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_84(T_, P_, pref_, __VA_ARGS__))
926#define COMMS_FIELD_TYPEDEF_86(T_, P_, pref_, n_, ...) \
927 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
928 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_85(T_, P_, pref_, __VA_ARGS__))
929#define COMMS_FIELD_TYPEDEF_87(T_, P_, pref_, n_, ...) \
930 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
931 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_86(T_, P_, pref_, __VA_ARGS__))
932#define COMMS_FIELD_TYPEDEF_88(T_, P_, pref_, n_, ...) \
933 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
934 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_87(T_, P_, pref_, __VA_ARGS__))
935#define COMMS_FIELD_TYPEDEF_89(T_, P_, pref_, n_, ...) \
936 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
937 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_88(T_, P_, pref_, __VA_ARGS__))
938#define COMMS_FIELD_TYPEDEF_90(T_, P_, pref_, n_, ...) \
939 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
940 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_89(T_, P_, pref_, __VA_ARGS__))
941#define COMMS_FIELD_TYPEDEF_91(T_, P_, pref_, n_, ...) \
942 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
943 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_90(T_, P_, pref_, __VA_ARGS__))
944#define COMMS_FIELD_TYPEDEF_92(T_, P_, pref_, n_, ...) \
945 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
946 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_91(T_, P_, pref_, __VA_ARGS__))
947#define COMMS_FIELD_TYPEDEF_93(T_, P_, pref_, n_, ...) \
948 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
949 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_92(T_, P_, pref_, __VA_ARGS__))
950#define COMMS_FIELD_TYPEDEF_94(T_, P_, pref_, n_, ...) \
951 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
952 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_93(T_, P_, pref_, __VA_ARGS__))
953#define COMMS_FIELD_TYPEDEF_95(T_, P_, pref_, n_, ...) \
954 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
955 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_94(T_, P_, pref_, __VA_ARGS__))
956#define COMMS_FIELD_TYPEDEF_96(T_, P_, pref_, n_, ...) \
957 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
958 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_95(T_, P_, pref_, __VA_ARGS__))
959#define COMMS_FIELD_TYPEDEF_97(T_, P_, pref_, n_, ...) \
960 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
961 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_96(T_, P_, pref_, __VA_ARGS__))
962#define COMMS_FIELD_TYPEDEF_98(T_, P_, pref_, n_, ...) \
963 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
964 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_97(T_, P_, pref_, __VA_ARGS__))
965#define COMMS_FIELD_TYPEDEF_99(T_, P_, pref_, n_, ...) \
966 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
967 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_98(T_, P_, pref_, __VA_ARGS__))
968#define COMMS_FIELD_TYPEDEF_100(T_, P_, pref_, n_, ...) \
969 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
970 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_99(T_, P_, pref_, __VA_ARGS__))
971#define COMMS_FIELD_TYPEDEF_101(T_, P_, pref_, n_, ...) \
972 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
973 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_100(T_, P_, pref_, __VA_ARGS__))
974#define COMMS_FIELD_TYPEDEF_102(T_, P_, pref_, n_, ...) \
975 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
976 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_101(T_, P_, pref_, __VA_ARGS__))
977#define COMMS_FIELD_TYPEDEF_103(T_, P_, pref_, n_, ...) \
978 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
979 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_102(T_, P_, pref_, __VA_ARGS__))
980#define COMMS_FIELD_TYPEDEF_104(T_, P_, pref_, n_, ...) \
981 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
982 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_103(T_, P_, pref_, __VA_ARGS__))
983#define COMMS_FIELD_TYPEDEF_105(T_, P_, pref_, n_, ...) \
984 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
985 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_104(T_, P_, pref_, __VA_ARGS__))
986#define COMMS_FIELD_TYPEDEF_106(T_, P_, pref_, n_, ...) \
987 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
988 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_105(T_, P_, pref_, __VA_ARGS__))
989#define COMMS_FIELD_TYPEDEF_107(T_, P_, pref_, n_, ...) \
990 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
991 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_106(T_, P_, pref_, __VA_ARGS__))
992#define COMMS_FIELD_TYPEDEF_108(T_, P_, pref_, n_, ...) \
993 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
994 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_107(T_, P_, pref_, __VA_ARGS__))
995#define COMMS_FIELD_TYPEDEF_109(T_, P_, pref_, n_, ...) \
996 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
997 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_108(T_, P_, pref_, __VA_ARGS__))
998#define COMMS_FIELD_TYPEDEF_110(T_, P_, pref_, n_, ...) \
999 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
1000 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_109(T_, P_, pref_, __VA_ARGS__))
1001#define COMMS_FIELD_TYPEDEF_111(T_, P_, pref_, n_, ...) \
1002 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
1003 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_110(T_, P_, pref_, __VA_ARGS__))
1004#define COMMS_FIELD_TYPEDEF_112(T_, P_, pref_, n_, ...) \
1005 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
1006 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_111(T_, P_, pref_, __VA_ARGS__))
1007#define COMMS_FIELD_TYPEDEF_113(T_, P_, pref_, n_, ...) \
1008 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
1009 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_112(T_, P_, pref_, __VA_ARGS__))
1010#define COMMS_FIELD_TYPEDEF_114(T_, P_, pref_, n_, ...) \
1011 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
1012 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_113(T_, P_, pref_, __VA_ARGS__))
1013#define COMMS_FIELD_TYPEDEF_115(T_, P_, pref_, n_, ...) \
1014 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
1015 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_114(T_, P_, pref_, __VA_ARGS__))
1016#define COMMS_FIELD_TYPEDEF_116(T_, P_, pref_, n_, ...) \
1017 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
1018 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_115(T_, P_, pref_, __VA_ARGS__))
1019#define COMMS_FIELD_TYPEDEF_117(T_, P_, pref_, n_, ...) \
1020 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
1021 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_116(T_, P_, pref_, __VA_ARGS__))
1022#define COMMS_FIELD_TYPEDEF_118(T_, P_, pref_, n_, ...) \
1023 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
1024 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_117(T_, P_, pref_, __VA_ARGS__))
1025#define COMMS_FIELD_TYPEDEF_119(T_, P_, pref_, n_, ...) \
1026 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
1027 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_118(T_, P_, pref_, __VA_ARGS__))
1028#define COMMS_FIELD_TYPEDEF_120(T_, P_, pref_, n_, ...) \
1029 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
1030 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_119(T_, P_, pref_, __VA_ARGS__))
1031#define COMMS_FIELD_TYPEDEF_121(T_, P_, pref_, n_, ...) \
1032 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
1033 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_120(T_, P_, pref_, __VA_ARGS__))
1034#define COMMS_FIELD_TYPEDEF_122(T_, P_, pref_, n_, ...) \
1035 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
1036 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_121(T_, P_, pref_, __VA_ARGS__))
1037#define COMMS_FIELD_TYPEDEF_123(T_, P_, pref_, n_, ...) \
1038 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
1039 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_122(T_, P_, pref_, __VA_ARGS__))
1040#define COMMS_FIELD_TYPEDEF_124(T_, P_, pref_, n_, ...) \
1041 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
1042 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_123(T_, P_, pref_, __VA_ARGS__))
1043#define COMMS_FIELD_TYPEDEF_125(T_, P_, pref_, n_, ...) \
1044 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
1045 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_124(T_, P_, pref_, __VA_ARGS__))
1046#define COMMS_FIELD_TYPEDEF_126(T_, P_, pref_, n_, ...) \
1047 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
1048 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_125(T_, P_, pref_, __VA_ARGS__))
1049#define COMMS_FIELD_TYPEDEF_127(T_, P_, pref_, n_, ...) \
1050 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
1051 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_126(T_, P_, pref_, __VA_ARGS__))
1052#define COMMS_FIELD_TYPEDEF_128(T_, P_, pref_, n_, ...) \
1053 COMMS_FIELD_TYPEDEF(T_, P_, pref_, n_) \
1054 COMMS_EXPAND(COMMS_FIELD_TYPEDEF_127(T_, P_, pref_, __VA_ARGS__))
1055
1056#define COMMS_CHOOSE_FIELD_TYPEDEF_(N, T_, P_, pref_, ...) COMMS_EXPAND(COMMS_FIELD_TYPEDEF_ ## N(T_, P_, pref_, __VA_ARGS__))
1057#define COMMS_CHOOSE_FIELD_TYPEDEF(N, T_, P_, pref_, ...) COMMS_EXPAND(COMMS_CHOOSE_FIELD_TYPEDEF_(N, T_, P_, pref_, __VA_ARGS__))
1058#define COMMS_DO_FIELD_TYPEDEF(T_, P_, pref_, ...) \
1059 COMMS_EXPAND(COMMS_CHOOSE_FIELD_TYPEDEF(COMMS_NUM_ARGS(__VA_ARGS__), T_, P_, pref_, __VA_ARGS__))
1060