HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
preprocessorUtils.h
Go to the documentation of this file.
1 //
2 // Copyright 2016 Pixar
3 //
4 // Licensed under the Apache License, Version 2.0 (the "Apache License")
5 // with the following modification; you may not use this file except in
6 // compliance with the Apache License and the following modification to it:
7 // Section 6. Trademarks. is deleted and replaced with:
8 //
9 // 6. Trademarks. This License does not grant permission to use the trade
10 // names, trademarks, service marks, or product names of the Licensor
11 // and its affiliates, except as required to comply with Section 4(c) of
12 // the License and to reproduce the content of the NOTICE file.
13 //
14 // You may obtain a copy of the Apache License at
15 //
16 // http://www.apache.org/licenses/LICENSE-2.0
17 //
18 // Unless required by applicable law or agreed to in writing, software
19 // distributed under the Apache License with the above modification is
20 // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
21 // KIND, either express or implied. See the Apache License for the specific
22 // language governing permissions and limitations under the Apache License.
23 //
24 #ifndef PXR_BASE_TF_PREPROCESSOR_UTILS_H
25 #define PXR_BASE_TF_PREPROCESSOR_UTILS_H
26 
27 /// \file tf/preprocessorUtils.h
28 /// \ingroup group_tf_Preprocessor
29 
30 #ifndef TF_MAX_ARITY
31 # define TF_MAX_ARITY 7
32 #endif // TF_MAX_ARITY
33 
34 #include "pxr/base/arch/defines.h"
35 #include "pxr/base/arch/pragmas.h"
36 #include <hboost/preprocessor/arithmetic/inc.hpp>
37 #include <hboost/preprocessor/arithmetic/sub.hpp>
38 #include <hboost/preprocessor/cat.hpp>
39 #include <hboost/preprocessor/control/expr_iif.hpp>
40 #include <hboost/preprocessor/comparison/equal.hpp>
41 #include <hboost/preprocessor/facilities/expand.hpp>
42 #include <hboost/preprocessor/punctuation/comma.hpp>
43 #include <hboost/preprocessor/punctuation/paren.hpp>
44 #include <hboost/preprocessor/repetition/repeat.hpp>
45 #include <hboost/preprocessor/tuple/to_list.hpp>
46 #include <hboost/preprocessor/tuple/to_seq.hpp>
47 #if defined(ARCH_COMPILER_MSVC)
48 #include <hboost/preprocessor/variadic/size.hpp>
49 #include <hboost/vmd/is_empty.hpp>
50 #include <hboost/vmd/is_tuple.hpp>
52 #endif
53 
54 // In hboost version 1.51, they seem to have neglected to define this.
55 // Without it, some functions will get confused about macros with no arguments
56 #ifndef HBOOST_PP_TUPLE_TO_SEQ_0
57 #define HBOOST_PP_TUPLE_TO_SEQ_0()
58 #endif
59 
60 /// Count the number of arguments.
61 ///
62 /// The underlying macro argument counting trick in the non-Windows
63 /// implementation originates from a posting on comp.std.c by Laurent Deniau.
64 ///
65 /// \ingroup group_tf_Preprocessor
66 /// \hideinitializer
67 #if defined(ARCH_COMPILER_MSVC)
68 #define TF_NUM_ARGS(...) \
69  HBOOST_PP_IIF(HBOOST_VMD_IS_EMPTY(__VA_ARGS__),\
70  0, HBOOST_PP_VARIADIC_SIZE(__VA_ARGS__))
71 #else
72 #define TF_NUM_ARGS(...) \
73  _TF_NUM_ARGS_CHECK(__VA_ARGS__) \
74  HBOOST_PP_IIF(HBOOST_PP_EQUAL(1, _TF_NUM_ARGS1(__VA_ARGS__)), \
75  HBOOST_PP_EXPAND(TF_ARG_2 HBOOST_PP_LPAREN() \
76  HBOOST_PP_EXPAND(_TF_NUM_ARGS_0X TF_ARG_1(__VA_ARGS__) \
77  (HBOOST_PP_REPEAT(TF_MAX_ARITY, _TF_NUM_ARGS_REP, _TF))) \
78  HBOOST_PP_COMMA() 1 HBOOST_PP_RPAREN()), \
79  _TF_NUM_ARGS1(__VA_ARGS__))
80 
81 #define _TF_NUM_ARGS_CHECK(...) \
82  HBOOST_PP_IIF(_TF_EXPAND(TF_ARG_2 HBOOST_PP_LPAREN() \
83  HBOOST_PP_CAT(_TF_NUM_ARGS_00, _TF_EXPAND( \
84  HBOOST_PP_CAT(TF_ARG_, HBOOST_PP_INC(TF_MAX_ARITY)) \
85  _TF_NUM_ARGS_TF(__VA_ARGS__))) HBOOST_PP_COMMA() 1 HBOOST_PP_RPAREN()), \
86  _TF_MAX_ARITY_OVERFLOW_IN_TF_NUM_ARGS, HBOOST_PP_TUPLE_EAT(1))(...)
87 
88 #define _TF_NUM_ARGS_00_TF 0, 0
89 #define _TF_MAX_ARITY_OVERFLOW_IN_TF_NUM_ARGS(a, b, c)
90 
91 #define _TF_NUM_ARGS_0X(a, ...) \
92  _TF_NUM_ARGS_CHECK(a, __VA_ARGS__) 0, \
93  HBOOST_PP_IIF(HBOOST_PP_EQUAL(TF_MAX_ARITY, _TF_NUM_ARGS1(__VA_ARGS__)), \
94  0, 1 HBOOST_PP_TUPLE_EAT(HBOOST_PP_INC(TF_MAX_ARITY)))
95 
96 #define _TF_EXPAND(x) x // We need this due to a bug in the preprocessor.
97 #define _TF_NUM_ARGS1(...) \
98  _TF_EXPAND(HBOOST_PP_CAT(TF_ARG_, HBOOST_PP_INC(TF_MAX_ARITY)) \
99  _TF_NUM_ARGS_EXT(__VA_ARGS__))
100 
101 #define _TF_NUM_ARGS_DEC(z, i, n) HBOOST_PP_COMMA() HBOOST_PP_SUB(n, i)
102 #define _TF_NUM_ARGS_REP(z, i, n) HBOOST_PP_COMMA() n
103 
104 #define _TF_NUM_ARGS_EXT(...) \
105  (__VA_ARGS__ HBOOST_PP_REPEAT(HBOOST_PP_INC(TF_MAX_ARITY), \
106  _TF_NUM_ARGS_DEC, TF_MAX_ARITY))
107 #define _TF_NUM_ARGS_TF(...) \
108  (__VA_ARGS__ HBOOST_PP_REPEAT(HBOOST_PP_INC(TF_MAX_ARITY), \
109  _TF_NUM_ARGS_REP, _TF))
110 #endif
111 
112 
113 /// Return the arguments as is except if the first argument starts with a
114 /// matched parenthesis then remove those parentheses.
115 /// \ingroup group_tf_Preprocessor
116 /// \hideinitializer
117 //
118 // If the arguments satisfy _TF_PP_EAT_PARENS_IS_PARENS() then we expand to
119 // _TF_PP_EAT_PARENS_EXPAND1, otherwise to _TF_PP_EAT_PARENS_EXPAND. The
120 // former eats the parentheses while the latter passes the arguments
121 // unchanged.
122 //
123 // We add the ~ after the first __VA_ARGS__ in case there are zero
124 // arguments. MSVC will complain about insufficient arguments otherwise.
125 // The ~ will be discarded in any case.
126 #define TF_PP_EAT_PARENS(...) \
127  _TF_PP_EAT_PARENS_IFF(_TF_PP_EAT_PARENS_IS_PARENS(__VA_ARGS__ ~),\
128  _TF_PP_EAT_PARENS_EXPAND1,_TF_PP_EAT_PARENS_EXPAND)(__VA_ARGS__)
129 
130 /// Expand the arguments and make the result a string.
131 // We can't use
132 // HBOOST_PP_STRINGIZE because on MSVC passing no arguments will report "not
133 // enough actual parameters" and yield nothing. We want no warnings and an
134 // empty string. We do that by passing an unused first argument to the inner
135 // macro (we need an inner macro to cause expansion). This causes MSVC to
136 // yield "" for an empty __VA_ARGS__ list.
137 #define TF_PP_EAT_PARENS_STR(...) _TF_PP_EAT_PARENS_STR2(~, __VA_ARGS__)
138 #define _TF_PP_EAT_PARENS_STR2(x, ...) #__VA_ARGS__
139 
140 // Expands to the second argument if c is 1 and the third argument if c is
141 // 0. No other values of c are allowed. We can't use HBOOST_PP_IFF() because
142 // it won't expand during stringizing under MSVC.
143 #define _TF_PP_EAT_PARENS_IFF(c, t, f) \
144  HBOOST_PP_CAT(_TF_PP_EAT_PARENS_IFF_, c)(t, f)
145 #define _TF_PP_EAT_PARENS_IFF_0(t, f) f
146 #define _TF_PP_EAT_PARENS_IFF_1(t, f) t
147 
148 // Force expansion of the arguments.
149 #define _TF_PP_EAT_PARENS_EXPAND(...) __VA_ARGS__
150 
151 // Similar to expand except it will eat the first matching pair of
152 // parentheses. For example, _TF_PP_EAT_PARENS_EXPAND1((x)(y)) yields x(y).
153 // The outer _TF_PP_EAT_PARENS_EXPAND() is needed for MSVC, which otherwise
154 // would stringizing to "_TF_PP_EAT_PARENS_EXPAND " plus the literal
155 // substitution of the arguments.
156 #define _TF_PP_EAT_PARENS_EXPAND1(...) \
157  _TF_PP_EAT_PARENS_EXPAND(_TF_PP_EAT_PARENS_EXPAND __VA_ARGS__)
158 
159 // This works around a MSVC bug. When a macro expands to FOO(__VA_ARGS__,bar),
160 // MSVC will separate the arguments of __VA_ARGS__ even if they're inside
161 // matching parentheses. So, for example, if __VA_ARGS__ is (x,y) then we'll
162 // expand to FOO(x,y,bar) instead of FOO((x,y),bar). This macro works around
163 // that. Use: _TF_PP_EAT_PARENS_CALL(FOO,(__VA_ARGS__,bar)).
164 //
165 // We need the _TF_PP_EAT_PARENS_EXPAND() here otherwise stringizing will
166 // stringize the literal replacements, not the result of the expansion of x y.
167 // If FOO(x,y) expands to x+y then we'd get "FOO ((x,y),bar)" without
168 // _TF_PP_EAT_PARENS_EXPAND() instead of the correct "(x,y)+bar".
169 #define _TF_PP_EAT_PARENS_CALL(x, y) _TF_PP_EAT_PARENS_EXPAND(x y)
170 
171 // Expands to 1 if x starts with a matched parenthesis, otherwise expands to
172 // 0. "_TF_PP_EAT_PARENS_IS_PARENS2 x" eats the parentheses if they exist and
173 // expands to "x, 1,", otherwise it expands to _TF_PP_EAT_PARENS_IS_PARENS2
174 // and the literal expansion of x. This result goes to
175 // _TF_PP_EAT_PARENS_IS_PARENS_CHECK_N() which extracts the 1 expanded from
176 // _TF_PP_EAT_PARENS_IS_PARENS2 or a 0 passed as a final argument. In either
177 // case the desired result is the second argument to
178 // _TF_PP_EAT_PARENS_IS_PARENS_CHECK_N.
179 #define _TF_PP_EAT_PARENS_IS_PARENS(x) \
180  _TF_PP_EAT_PARENS_IS_PARENS_CHECK(_TF_PP_EAT_PARENS_IS_PARENS2 x)
181 #define _TF_PP_EAT_PARENS_IS_PARENS_CHECK(...) \
182  _TF_PP_EAT_PARENS_CALL(_TF_PP_EAT_PARENS_IS_PARENS_CHECK_N,(__VA_ARGS__,0,))
183 #define _TF_PP_EAT_PARENS_IS_PARENS_CHECK_N(x, n, ...) n
184 #define _TF_PP_EAT_PARENS_IS_PARENS_TRUE(x) x, 1,
185 #define _TF_PP_EAT_PARENS_IS_PARENS2(...) _TF_PP_EAT_PARENS_IS_PARENS_TRUE(~)
186 
187 /// Exapnds to 1 if the argument is a tuple, and 0 otherwise.
188 /// \ingroup group_tf_Preprocessor
189 /// \hideinitializer
190 #if defined(ARCH_COMPILER_MSVC)
191  #define TF_PP_IS_TUPLE(sequence) \
192  HBOOST_VMD_IS_TUPLE(sequence)
193 #else
194 
195 #define TF_PP_IS_TUPLE(arg) \
196  HBOOST_PP_CAT(_TF_PP_IS_TUPLE, HBOOST_PP_EXPAND(_TF_PP_IS_TUPLE arg)) )
197 
198 #define _TF_PP_IS_TUPLE(...) _TF
199 
200 #define _TF_PP_IS_TUPLE_TF _TF_PP_IS_TUPLE_TRUE(
201 #define _TF_PP_IS_TUPLE_TF_PP_IS_TUPLE _TF_PP_IS_TUPLE_FALSE(
202 
203 #define _TF_PP_IS_TUPLE_TRUE() 1
204 #define _TF_PP_IS_TUPLE_FALSE(arg) 0
205 
206 #endif
207 
208 /// Count the number of elements in a preprocessor tuple.
209 /// \ingroup group_tf_Preprocessor
210 /// \hideinitializer
211 #define TF_PP_TUPLE_SIZE(tuple) \
212  HBOOST_PP_EXPAND(TF_NUM_ARGS tuple)
213 
214 /// Convert a preprocessor tuple to a preprocessor list.
215 /// \ingroup group_tf_Preprocessor
216 /// \hideinitializer
217 #define TF_PP_TUPLE_TO_LIST(tuple) \
218  HBOOST_PP_IIF( \
219  HBOOST_PP_EQUAL(TF_PP_TUPLE_SIZE(tuple), 0), \
220  HBOOST_PP_LIST_NIL, \
221  HBOOST_PP_TUPLE_TO_LIST(TF_PP_TUPLE_SIZE(tuple), tuple))
222 
223 /// Convert a preprocessor tuple to a preprocessor sequence.
224 /// \ingroup group_tf_Preprocessor
225 /// \hideinitializer
226 #define TF_PP_TUPLE_TO_SEQ(tuple) \
227  HBOOST_PP_IIF( \
228  HBOOST_PP_EQUAL(TF_PP_TUPLE_SIZE(tuple), 0), \
229  HBOOST_PP_EMPTY(), \
230  HBOOST_PP_TUPLE_TO_SEQ(TF_PP_TUPLE_SIZE(tuple), tuple))
231 
232 /// Create a preprocessor array.
233 /// \ingroup group_tf_Preprocessor
234 /// \hideinitializer
235 #define TF_MAKE_PP_ARRAY(...) \
236  (TF_NUM_ARGS(__VA_ARGS__), (__VA_ARGS__))
237 
238 /// Create a preprocessor list.
239 /// \ingroup group_tf_Preprocessor
240 /// \hideinitializer
241 #define TF_MAKE_PP_LIST(...) \
242  TF_PP_TUPLE_TO_LIST((__VA_ARGS__))
243 
244 /// Create a preprocessor sequence.
245 /// \ingroup group_tf_Preprocessor
246 /// \hideinitializer
247 #define TF_MAKE_PP_SEQ(...) \
248  TF_PP_TUPLE_TO_SEQ((__VA_ARGS__))
249 
250 /// Macros that expand to a specific argument.
251 /// \ingroup group_tf_Preprocessor
252 /// \hideinitializer
253 #define TF_ARG_1(_1,...) _1
254 #define TF_ARG_2(_1,_2,...) _2
255 #define TF_ARG_3(_1,_2,_3,...) _3
256 #define TF_ARG_4(_1,_2,_3,_4,...) _4
257 #define TF_ARG_5(_1,_2,_3,_4,_5,...) _5
258 #define TF_ARG_6(_1,_2,_3,_4,_5,_6,...) _6
259 #define TF_ARG_7(_1,_2,_3,_4,_5,_6,_7,...) _7
260 #define TF_ARG_8(_1,_2,_3,_4,_5,_6,_7,_8,...) _8
261 #define TF_ARG_9(_1,_2,_3,_4,_5,_6,_7,_8,_9,...) _9
262 #define TF_ARG_10(_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,...) _10
263 #define TF_ARG_11(_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,...) _11
264 #define TF_ARG_12(_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,...) _12
265 #define TF_ARG_13(_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,...) _13
266 #define TF_ARG_14(_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,...) _14
267 #define TF_ARG_15(_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,...) _15
268 #define TF_ARG_16(_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,...) _16
269 #define TF_ARG_17(_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,...) _17
270 #define TF_ARG_18(_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,...) _18
271 #define TF_ARG_19(_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,...) _19
272 #define TF_ARG_20(_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,...) _20
273 #define TF_ARG_21(_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,...) _21
274 #define TF_ARG_22(_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22,...) _22
275 #define TF_ARG_23(_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22,_23,...) _23
276 #define TF_ARG_24(_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22,_23,_24,...) _24
277 #define TF_ARG_25(_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,...) _25
278 #define TF_ARG_26(_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,...) _26
279 #define TF_ARG_27(_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,...) _27
280 #define TF_ARG_28(_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,...) _28
281 #define TF_ARG_29(_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,...) _29
282 #define TF_ARG_30(_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,...) _30
283 #define TF_ARG_31(_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,...) _31
284 #define TF_ARG_32(_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,_32,...) _32
285 #define TF_ARG_33(_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,_32,_33,...) _33
286 #define TF_ARG_34(_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,_32,_33,_34,...) _34
287 #define TF_ARG_35(_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,_32,_33,_34,_35,...) _35
288 #define TF_ARG_36(_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,_32,_33,_34,_35,_36,...) _36
289 #define TF_ARG_37(_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,_32,_33,_34,_35,_36,_37,...) _37
290 #define TF_ARG_38(_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,_32,_33,_34,_35,_36,_37,_38,...) _38
291 #define TF_ARG_39(_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,_32,_33,_34,_35,_36,_37,_38,_39,...) _39
292 #define TF_ARG_40(_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,_32,_33,_34,_35,_36,_37,_38,_39,_40,...) _40
293 #define TF_ARG_41(_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,_32,_33,_34,_35,_36,_37,_38,_39,_40,_41,...) _41
294 #define TF_ARG_42(_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,_32,_33,_34,_35,_36,_37,_38,_39,_40,_41,_42,...) _42
295 #define TF_ARG_43(_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,_32,_33,_34,_35,_36,_37,_38,_39,_40,_41,_42,_43,...) _43
296 #define TF_ARG_44(_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,_32,_33,_34,_35,_36,_37,_38,_39,_40,_41,_42,_43,_44,...) _44
297 #define TF_ARG_45(_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,_32,_33,_34,_35,_36,_37,_38,_39,_40,_41,_42,_43,_44,_45,...) _45
298 #define TF_ARG_46(_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,_32,_33,_34,_35,_36,_37,_38,_39,_40,_41,_42,_43,_44,_45,_46,...) _46
299 #define TF_ARG_47(_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,_32,_33,_34,_35,_36,_37,_38,_39,_40,_41,_42,_43,_44,_45,_46,_47,...) _47
300 #define TF_ARG_48(_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,_32,_33,_34,_35,_36,_37,_38,_39,_40,_41,_42,_43,_44,_45,_46,_47,_48,...) _48
301 #define TF_ARG_49(_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,_32,_33,_34,_35,_36,_37,_38,_39,_40,_41,_42,_43,_44,_45,_46,_47,_48,_49,...) _49
302 #define TF_ARG_50(_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,_32,_33,_34,_35,_36,_37,_38,_39,_40,_41,_42,_43,_44,_45,_46,_47,_48,_49,_50,...) _50
303 #define TF_ARG_51(_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,_32,_33,_34,_35,_36,_37,_38,_39,_40,_41,_42,_43,_44,_45,_46,_47,_48,_49,_50,_51,...) _51
304 #define TF_ARG_52(_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,_32,_33,_34,_35,_36,_37,_38,_39,_40,_41,_42,_43,_44,_45,_46,_47,_48,_49,_50,_51,_52,...) _52
305 #define TF_ARG_53(_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,_32,_33,_34,_35,_36,_37,_38,_39,_40,_41,_42,_43,_44,_45,_46,_47,_48,_49,_50,_51,_52,_53,...) _53
306 #define TF_ARG_54(_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,_32,_33,_34,_35,_36,_37,_38,_39,_40,_41,_42,_43,_44,_45,_46,_47,_48,_49,_50,_51,_52,_53,_54,...) _54
307 #define TF_ARG_55(_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,_32,_33,_34,_35,_36,_37,_38,_39,_40,_41,_42,_43,_44,_45,_46,_47,_48,_49,_50,_51,_52,_53,_54,_55,...) _55
308 #define TF_ARG_56(_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,_32,_33,_34,_35,_36,_37,_38,_39,_40,_41,_42,_43,_44,_45,_46,_47,_48,_49,_50,_51,_52,_53,_54,_55,_56,...) _56
309 #define TF_ARG_57(_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,_32,_33,_34,_35,_36,_37,_38,_39,_40,_41,_42,_43,_44,_45,_46,_47,_48,_49,_50,_51,_52,_53,_54,_55,_56,_57,...) _57
310 #define TF_ARG_58(_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,_32,_33,_34,_35,_36,_37,_38,_39,_40,_41,_42,_43,_44,_45,_46,_47,_48,_49,_50,_51,_52,_53,_54,_55,_56,_57,_58,...) _58
311 #define TF_ARG_59(_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,_32,_33,_34,_35,_36,_37,_38,_39,_40,_41,_42,_43,_44,_45,_46,_47,_48,_49,_50,_51,_52,_53,_54,_55,_56,_57,_58,_59,...) _59
312 #define TF_ARG_60(_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,_32,_33,_34,_35,_36,_37,_38,_39,_40,_41,_42,_43,_44,_45,_46,_47,_48,_49,_50,_51,_52,_53,_54,_55,_56,_57,_58,_59,_60,...) _60
313 #define TF_ARG_61(_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,_32,_33,_34,_35,_36,_37,_38,_39,_40,_41,_42,_43,_44,_45,_46,_47,_48,_49,_50,_51,_52,_53,_54,_55,_56,_57,_58,_59,_60,_61,...) _61
314 #define TF_ARG_62(_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,_32,_33,_34,_35,_36,_37,_38,_39,_40,_41,_42,_43,_44,_45,_46,_47,_48,_49,_50,_51,_52,_53,_54,_55,_56,_57,_58,_59,_60,_61,_62,...) _62
315 #define TF_ARG_63(_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,_32,_33,_34,_35,_36,_37,_38,_39,_40,_41,_42,_43,_44,_45,_46,_47,_48,_49,_50,_51,_52,_53,_54,_55,_56,_57,_58,_59,_60,_61,_62,_63,...) _63
316 #define TF_ARG_64(_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,_32,_33,_34,_35,_36,_37,_38,_39,_40,_41,_42,_43,_44,_45,_46,_47,_48,_49,_50,_51,_52,_53,_54,_55,_56,_57,_58,_59,_60,_61,_62,_63,_64,...) _64
317 
318 #if TF_MAX_ARITY > 64
319 #error "TF_MAX_ARITY is larger than _MAX_ARGS"
320 #endif
321 
322 #endif /* PXR_BASE_TF_PREPROCESSOR_UTILS_H */
#define ARCH_PRAGMA_MACRO_TOO_FEW_ARGUMENTS
Definition: pragmas.h:206