1 /* Hedley - https://nemequ.github.io/hedley
2  * Created by Evan Nemerson <evan@nemerson.com>
3  *
4  * To the extent possible under law, the author(s) have dedicated all
5  * copyright and related and neighboring rights to this software to
6  * the public domain worldwide. This software is distributed without
7  * any warranty.
8  *
9  * For details, see <http://creativecommons.org/publicdomain/zero/1.0/>.
10  * SPDX-License-Identifier: CC0-1.0
11  */
12 
13 #if !defined(HEDLEY_VERSION) || (HEDLEY_VERSION < 14)
14 #if defined(HEDLEY_VERSION)
15 #  undef HEDLEY_VERSION
16 #endif
17 #define HEDLEY_VERSION 14
18 
19 #if defined(HEDLEY_STRINGIFY_EX)
20 #  undef HEDLEY_STRINGIFY_EX
21 #endif
22 #define HEDLEY_STRINGIFY_EX(x) #x
23 
24 #if defined(HEDLEY_STRINGIFY)
25 #  undef HEDLEY_STRINGIFY
26 #endif
27 #define HEDLEY_STRINGIFY(x) HEDLEY_STRINGIFY_EX(x)
28 
29 #if defined(HEDLEY_CONCAT_EX)
30 #  undef HEDLEY_CONCAT_EX
31 #endif
32 #define HEDLEY_CONCAT_EX(a,b) a##b
33 
34 #if defined(HEDLEY_CONCAT)
35 #  undef HEDLEY_CONCAT
36 #endif
37 #define HEDLEY_CONCAT(a,b) HEDLEY_CONCAT_EX(a,b)
38 
39 #if defined(HEDLEY_CONCAT3_EX)
40 #  undef HEDLEY_CONCAT3_EX
41 #endif
42 #define HEDLEY_CONCAT3_EX(a,b,c) a##b##c
43 
44 #if defined(HEDLEY_CONCAT3)
45 #  undef HEDLEY_CONCAT3
46 #endif
47 #define HEDLEY_CONCAT3(a,b,c) HEDLEY_CONCAT3_EX(a,b,c)
48 
49 #if defined(HEDLEY_VERSION_ENCODE)
50 #  undef HEDLEY_VERSION_ENCODE
51 #endif
52 #define HEDLEY_VERSION_ENCODE(major,minor,revision) (((major) * 1000000) + ((minor) * 1000) + (revision))
53 
54 #if defined(HEDLEY_VERSION_DECODE_MAJOR)
55 #  undef HEDLEY_VERSION_DECODE_MAJOR
56 #endif
57 #define HEDLEY_VERSION_DECODE_MAJOR(version) ((version) / 1000000)
58 
59 #if defined(HEDLEY_VERSION_DECODE_MINOR)
60 #  undef HEDLEY_VERSION_DECODE_MINOR
61 #endif
62 #define HEDLEY_VERSION_DECODE_MINOR(version) (((version) % 1000000) / 1000)
63 
64 #if defined(HEDLEY_VERSION_DECODE_REVISION)
65 #  undef HEDLEY_VERSION_DECODE_REVISION
66 #endif
67 #define HEDLEY_VERSION_DECODE_REVISION(version) ((version) % 1000)
68 
69 #if defined(HEDLEY_GNUC_VERSION)
70 #  undef HEDLEY_GNUC_VERSION
71 #endif
72 #if defined(__GNUC__) && defined(__GNUC_PATCHLEVEL__)
73 #  define HEDLEY_GNUC_VERSION HEDLEY_VERSION_ENCODE(__GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__)
74 #elif defined(__GNUC__)
75 #  define HEDLEY_GNUC_VERSION HEDLEY_VERSION_ENCODE(__GNUC__, __GNUC_MINOR__, 0)
76 #endif
77 
78 #if defined(HEDLEY_GNUC_VERSION_CHECK)
79 #  undef HEDLEY_GNUC_VERSION_CHECK
80 #endif
81 #if defined(HEDLEY_GNUC_VERSION)
82 #  define HEDLEY_GNUC_VERSION_CHECK(major,minor,patch) (HEDLEY_GNUC_VERSION >= HEDLEY_VERSION_ENCODE(major, minor, patch))
83 #else
84 #  define HEDLEY_GNUC_VERSION_CHECK(major,minor,patch) (0)
85 #endif
86 
87 #if defined(HEDLEY_MSVC_VERSION)
88 #  undef HEDLEY_MSVC_VERSION
89 #endif
90 #if defined(_MSC_FULL_VER) && (_MSC_FULL_VER >= 140000000)
91 #  define HEDLEY_MSVC_VERSION HEDLEY_VERSION_ENCODE(_MSC_FULL_VER / 10000000, (_MSC_FULL_VER % 10000000) / 100000, (_MSC_FULL_VER % 100000) / 100)
92 #elif defined(_MSC_FULL_VER)
93 #  define HEDLEY_MSVC_VERSION HEDLEY_VERSION_ENCODE(_MSC_FULL_VER / 1000000, (_MSC_FULL_VER % 1000000) / 10000, (_MSC_FULL_VER % 10000) / 10)
94 #elif defined(_MSC_VER)
95 #  define HEDLEY_MSVC_VERSION HEDLEY_VERSION_ENCODE(_MSC_VER / 100, _MSC_VER % 100, 0)
96 #endif
97 
98 #if defined(HEDLEY_MSVC_VERSION_CHECK)
99 #  undef HEDLEY_MSVC_VERSION_CHECK
100 #endif
101 #if !defined(_MSC_VER)
102 #  define HEDLEY_MSVC_VERSION_CHECK(major,minor,patch) (0)
103 #elif defined(_MSC_VER) && (_MSC_VER >= 1400)
104 #  define HEDLEY_MSVC_VERSION_CHECK(major,minor,patch) (_MSC_FULL_VER >= ((major * 10000000) + (minor * 100000) + (patch)))
105 #elif defined(_MSC_VER) && (_MSC_VER >= 1200)
106 #  define HEDLEY_MSVC_VERSION_CHECK(major,minor,patch) (_MSC_FULL_VER >= ((major * 1000000) + (minor * 10000) + (patch)))
107 #else
108 #  define HEDLEY_MSVC_VERSION_CHECK(major,minor,patch) (_MSC_VER >= ((major * 100) + (minor)))
109 #endif
110 
111 #if defined(HEDLEY_INTEL_VERSION)
112 #  undef HEDLEY_INTEL_VERSION
113 #endif
114 #if defined(__INTEL_COMPILER) && defined(__INTEL_COMPILER_UPDATE)
115 #  define HEDLEY_INTEL_VERSION HEDLEY_VERSION_ENCODE(__INTEL_COMPILER / 100, __INTEL_COMPILER % 100, __INTEL_COMPILER_UPDATE)
116 #elif defined(__INTEL_COMPILER)
117 #  define HEDLEY_INTEL_VERSION HEDLEY_VERSION_ENCODE(__INTEL_COMPILER / 100, __INTEL_COMPILER % 100, 0)
118 #endif
119 
120 #if defined(HEDLEY_INTEL_VERSION_CHECK)
121 #  undef HEDLEY_INTEL_VERSION_CHECK
122 #endif
123 #if defined(HEDLEY_INTEL_VERSION)
124 #  define HEDLEY_INTEL_VERSION_CHECK(major,minor,patch) (HEDLEY_INTEL_VERSION >= HEDLEY_VERSION_ENCODE(major, minor, patch))
125 #else
126 #  define HEDLEY_INTEL_VERSION_CHECK(major,minor,patch) (0)
127 #endif
128 
129 #if defined(HEDLEY_PGI_VERSION)
130 #  undef HEDLEY_PGI_VERSION
131 #endif
132 #if defined(__PGI) && defined(__PGIC__) && defined(__PGIC_MINOR__) && defined(__PGIC_PATCHLEVEL__)
133 #  define HEDLEY_PGI_VERSION HEDLEY_VERSION_ENCODE(__PGIC__, __PGIC_MINOR__, __PGIC_PATCHLEVEL__)
134 #endif
135 
136 #if defined(HEDLEY_PGI_VERSION_CHECK)
137 #  undef HEDLEY_PGI_VERSION_CHECK
138 #endif
139 #if defined(HEDLEY_PGI_VERSION)
140 #  define HEDLEY_PGI_VERSION_CHECK(major,minor,patch) (HEDLEY_PGI_VERSION >= HEDLEY_VERSION_ENCODE(major, minor, patch))
141 #else
142 #  define HEDLEY_PGI_VERSION_CHECK(major,minor,patch) (0)
143 #endif
144 
145 #if defined(HEDLEY_SUNPRO_VERSION)
146 #  undef HEDLEY_SUNPRO_VERSION
147 #endif
148 #if defined(__SUNPRO_C) && (__SUNPRO_C > 0x1000)
149 #  define HEDLEY_SUNPRO_VERSION HEDLEY_VERSION_ENCODE((((__SUNPRO_C >> 16) & 0xf) * 10) + ((__SUNPRO_C >> 12) & 0xf), (((__SUNPRO_C >> 8) & 0xf) * 10) + ((__SUNPRO_C >> 4) & 0xf), (__SUNPRO_C & 0xf) * 10)
150 #elif defined(__SUNPRO_C)
151 #  define HEDLEY_SUNPRO_VERSION HEDLEY_VERSION_ENCODE((__SUNPRO_C >> 8) & 0xf, (__SUNPRO_C >> 4) & 0xf, (__SUNPRO_C) & 0xf)
152 #elif defined(__SUNPRO_CC) && (__SUNPRO_CC > 0x1000)
153 #  define HEDLEY_SUNPRO_VERSION HEDLEY_VERSION_ENCODE((((__SUNPRO_CC >> 16) & 0xf) * 10) + ((__SUNPRO_CC >> 12) & 0xf), (((__SUNPRO_CC >> 8) & 0xf) * 10) + ((__SUNPRO_CC >> 4) & 0xf), (__SUNPRO_CC & 0xf) * 10)
154 #elif defined(__SUNPRO_CC)
155 #  define HEDLEY_SUNPRO_VERSION HEDLEY_VERSION_ENCODE((__SUNPRO_CC >> 8) & 0xf, (__SUNPRO_CC >> 4) & 0xf, (__SUNPRO_CC) & 0xf)
156 #endif
157 
158 #if defined(HEDLEY_SUNPRO_VERSION_CHECK)
159 #  undef HEDLEY_SUNPRO_VERSION_CHECK
160 #endif
161 #if defined(HEDLEY_SUNPRO_VERSION)
162 #  define HEDLEY_SUNPRO_VERSION_CHECK(major,minor,patch) (HEDLEY_SUNPRO_VERSION >= HEDLEY_VERSION_ENCODE(major, minor, patch))
163 #else
164 #  define HEDLEY_SUNPRO_VERSION_CHECK(major,minor,patch) (0)
165 #endif
166 
167 #if defined(HEDLEY_EMSCRIPTEN_VERSION)
168 #  undef HEDLEY_EMSCRIPTEN_VERSION
169 #endif
170 #if defined(__EMSCRIPTEN__)
171 #  define HEDLEY_EMSCRIPTEN_VERSION HEDLEY_VERSION_ENCODE(__EMSCRIPTEN_major__, __EMSCRIPTEN_minor__, __EMSCRIPTEN_tiny__)
172 #endif
173 
174 #if defined(HEDLEY_EMSCRIPTEN_VERSION_CHECK)
175 #  undef HEDLEY_EMSCRIPTEN_VERSION_CHECK
176 #endif
177 #if defined(HEDLEY_EMSCRIPTEN_VERSION)
178 #  define HEDLEY_EMSCRIPTEN_VERSION_CHECK(major,minor,patch) (HEDLEY_EMSCRIPTEN_VERSION >= HEDLEY_VERSION_ENCODE(major, minor, patch))
179 #else
180 #  define HEDLEY_EMSCRIPTEN_VERSION_CHECK(major,minor,patch) (0)
181 #endif
182 
183 #if defined(HEDLEY_ARM_VERSION)
184 #  undef HEDLEY_ARM_VERSION
185 #endif
186 #if defined(__CC_ARM) && defined(__ARMCOMPILER_VERSION)
187 #  define HEDLEY_ARM_VERSION HEDLEY_VERSION_ENCODE(__ARMCOMPILER_VERSION / 1000000, (__ARMCOMPILER_VERSION % 1000000) / 10000, (__ARMCOMPILER_VERSION % 10000) / 100)
188 #elif defined(__CC_ARM) && defined(__ARMCC_VERSION)
189 #  define HEDLEY_ARM_VERSION HEDLEY_VERSION_ENCODE(__ARMCC_VERSION / 1000000, (__ARMCC_VERSION % 1000000) / 10000, (__ARMCC_VERSION % 10000) / 100)
190 #endif
191 
192 #if defined(HEDLEY_ARM_VERSION_CHECK)
193 #  undef HEDLEY_ARM_VERSION_CHECK
194 #endif
195 #if defined(HEDLEY_ARM_VERSION)
196 #  define HEDLEY_ARM_VERSION_CHECK(major,minor,patch) (HEDLEY_ARM_VERSION >= HEDLEY_VERSION_ENCODE(major, minor, patch))
197 #else
198 #  define HEDLEY_ARM_VERSION_CHECK(major,minor,patch) (0)
199 #endif
200 
201 #if defined(HEDLEY_IBM_VERSION)
202 #  undef HEDLEY_IBM_VERSION
203 #endif
204 #if defined(__ibmxl__)
205 #  define HEDLEY_IBM_VERSION HEDLEY_VERSION_ENCODE(__ibmxl_version__, __ibmxl_release__, __ibmxl_modification__)
206 #elif defined(__xlC__) && defined(__xlC_ver__)
207 #  define HEDLEY_IBM_VERSION HEDLEY_VERSION_ENCODE(__xlC__ >> 8, __xlC__ & 0xff, (__xlC_ver__ >> 8) & 0xff)
208 #elif defined(__xlC__)
209 #  define HEDLEY_IBM_VERSION HEDLEY_VERSION_ENCODE(__xlC__ >> 8, __xlC__ & 0xff, 0)
210 #endif
211 
212 #if defined(HEDLEY_IBM_VERSION_CHECK)
213 #  undef HEDLEY_IBM_VERSION_CHECK
214 #endif
215 #if defined(HEDLEY_IBM_VERSION)
216 #  define HEDLEY_IBM_VERSION_CHECK(major,minor,patch) (HEDLEY_IBM_VERSION >= HEDLEY_VERSION_ENCODE(major, minor, patch))
217 #else
218 #  define HEDLEY_IBM_VERSION_CHECK(major,minor,patch) (0)
219 #endif
220 
221 #if defined(HEDLEY_TI_VERSION)
222 #  undef HEDLEY_TI_VERSION
223 #endif
224 #if \
225     defined(__TI_COMPILER_VERSION__) && \
226     ( \
227       defined(__TMS470__) || defined(__TI_ARM__) || \
228       defined(__MSP430__) || \
229       defined(__TMS320C2000__) \
230     )
231 #  if (__TI_COMPILER_VERSION__ >= 16000000)
232 #    define HEDLEY_TI_VERSION HEDLEY_VERSION_ENCODE(__TI_COMPILER_VERSION__ / 1000000, (__TI_COMPILER_VERSION__ % 1000000) / 1000, (__TI_COMPILER_VERSION__ % 1000))
233 #  endif
234 #endif
235 
236 #if defined(HEDLEY_TI_VERSION_CHECK)
237 #  undef HEDLEY_TI_VERSION_CHECK
238 #endif
239 #if defined(HEDLEY_TI_VERSION)
240 #  define HEDLEY_TI_VERSION_CHECK(major,minor,patch) (HEDLEY_TI_VERSION >= HEDLEY_VERSION_ENCODE(major, minor, patch))
241 #else
242 #  define HEDLEY_TI_VERSION_CHECK(major,minor,patch) (0)
243 #endif
244 
245 #if defined(HEDLEY_TI_CL2000_VERSION)
246 #  undef HEDLEY_TI_CL2000_VERSION
247 #endif
248 #if defined(__TI_COMPILER_VERSION__) && defined(__TMS320C2000__)
249 #  define HEDLEY_TI_CL2000_VERSION HEDLEY_VERSION_ENCODE(__TI_COMPILER_VERSION__ / 1000000, (__TI_COMPILER_VERSION__ % 1000000) / 1000, (__TI_COMPILER_VERSION__ % 1000))
250 #endif
251 
252 #if defined(HEDLEY_TI_CL2000_VERSION_CHECK)
253 #  undef HEDLEY_TI_CL2000_VERSION_CHECK
254 #endif
255 #if defined(HEDLEY_TI_CL2000_VERSION)
256 #  define HEDLEY_TI_CL2000_VERSION_CHECK(major,minor,patch) (HEDLEY_TI_CL2000_VERSION >= HEDLEY_VERSION_ENCODE(major, minor, patch))
257 #else
258 #  define HEDLEY_TI_CL2000_VERSION_CHECK(major,minor,patch) (0)
259 #endif
260 
261 #if defined(HEDLEY_TI_CL430_VERSION)
262 #  undef HEDLEY_TI_CL430_VERSION
263 #endif
264 #if defined(__TI_COMPILER_VERSION__) && defined(__MSP430__)
265 #  define HEDLEY_TI_CL430_VERSION HEDLEY_VERSION_ENCODE(__TI_COMPILER_VERSION__ / 1000000, (__TI_COMPILER_VERSION__ % 1000000) / 1000, (__TI_COMPILER_VERSION__ % 1000))
266 #endif
267 
268 #if defined(HEDLEY_TI_CL430_VERSION_CHECK)
269 #  undef HEDLEY_TI_CL430_VERSION_CHECK
270 #endif
271 #if defined(HEDLEY_TI_CL430_VERSION)
272 #  define HEDLEY_TI_CL430_VERSION_CHECK(major,minor,patch) (HEDLEY_TI_CL430_VERSION >= HEDLEY_VERSION_ENCODE(major, minor, patch))
273 #else
274 #  define HEDLEY_TI_CL430_VERSION_CHECK(major,minor,patch) (0)
275 #endif
276 
277 #if defined(HEDLEY_TI_ARMCL_VERSION)
278 #  undef HEDLEY_TI_ARMCL_VERSION
279 #endif
280 #if defined(__TI_COMPILER_VERSION__) && (defined(__TMS470__) || defined(__TI_ARM__))
281 #  define HEDLEY_TI_ARMCL_VERSION HEDLEY_VERSION_ENCODE(__TI_COMPILER_VERSION__ / 1000000, (__TI_COMPILER_VERSION__ % 1000000) / 1000, (__TI_COMPILER_VERSION__ % 1000))
282 #endif
283 
284 #if defined(HEDLEY_TI_ARMCL_VERSION_CHECK)
285 #  undef HEDLEY_TI_ARMCL_VERSION_CHECK
286 #endif
287 #if defined(HEDLEY_TI_ARMCL_VERSION)
288 #  define HEDLEY_TI_ARMCL_VERSION_CHECK(major,minor,patch) (HEDLEY_TI_ARMCL_VERSION >= HEDLEY_VERSION_ENCODE(major, minor, patch))
289 #else
290 #  define HEDLEY_TI_ARMCL_VERSION_CHECK(major,minor,patch) (0)
291 #endif
292 
293 #if defined(HEDLEY_TI_CL6X_VERSION)
294 #  undef HEDLEY_TI_CL6X_VERSION
295 #endif
296 #if defined(__TI_COMPILER_VERSION__) && defined(__TMS320C6X__)
297 #  define HEDLEY_TI_CL6X_VERSION HEDLEY_VERSION_ENCODE(__TI_COMPILER_VERSION__ / 1000000, (__TI_COMPILER_VERSION__ % 1000000) / 1000, (__TI_COMPILER_VERSION__ % 1000))
298 #endif
299 
300 #if defined(HEDLEY_TI_CL6X_VERSION_CHECK)
301 #  undef HEDLEY_TI_CL6X_VERSION_CHECK
302 #endif
303 #if defined(HEDLEY_TI_CL6X_VERSION)
304 #  define HEDLEY_TI_CL6X_VERSION_CHECK(major,minor,patch) (HEDLEY_TI_CL6X_VERSION >= HEDLEY_VERSION_ENCODE(major, minor, patch))
305 #else
306 #  define HEDLEY_TI_CL6X_VERSION_CHECK(major,minor,patch) (0)
307 #endif
308 
309 #if defined(HEDLEY_TI_CL7X_VERSION)
310 #  undef HEDLEY_TI_CL7X_VERSION
311 #endif
312 #if defined(__TI_COMPILER_VERSION__) && defined(__C7000__)
313 #  define HEDLEY_TI_CL7X_VERSION HEDLEY_VERSION_ENCODE(__TI_COMPILER_VERSION__ / 1000000, (__TI_COMPILER_VERSION__ % 1000000) / 1000, (__TI_COMPILER_VERSION__ % 1000))
314 #endif
315 
316 #if defined(HEDLEY_TI_CL7X_VERSION_CHECK)
317 #  undef HEDLEY_TI_CL7X_VERSION_CHECK
318 #endif
319 #if defined(HEDLEY_TI_CL7X_VERSION)
320 #  define HEDLEY_TI_CL7X_VERSION_CHECK(major,minor,patch) (HEDLEY_TI_CL7X_VERSION >= HEDLEY_VERSION_ENCODE(major, minor, patch))
321 #else
322 #  define HEDLEY_TI_CL7X_VERSION_CHECK(major,minor,patch) (0)
323 #endif
324 
325 #if defined(HEDLEY_TI_CLPRU_VERSION)
326 #  undef HEDLEY_TI_CLPRU_VERSION
327 #endif
328 #if defined(__TI_COMPILER_VERSION__) && defined(__PRU__)
329 #  define HEDLEY_TI_CLPRU_VERSION HEDLEY_VERSION_ENCODE(__TI_COMPILER_VERSION__ / 1000000, (__TI_COMPILER_VERSION__ % 1000000) / 1000, (__TI_COMPILER_VERSION__ % 1000))
330 #endif
331 
332 #if defined(HEDLEY_TI_CLPRU_VERSION_CHECK)
333 #  undef HEDLEY_TI_CLPRU_VERSION_CHECK
334 #endif
335 #if defined(HEDLEY_TI_CLPRU_VERSION)
336 #  define HEDLEY_TI_CLPRU_VERSION_CHECK(major,minor,patch) (HEDLEY_TI_CLPRU_VERSION >= HEDLEY_VERSION_ENCODE(major, minor, patch))
337 #else
338 #  define HEDLEY_TI_CLPRU_VERSION_CHECK(major,minor,patch) (0)
339 #endif
340 
341 #if defined(HEDLEY_CRAY_VERSION)
342 #  undef HEDLEY_CRAY_VERSION
343 #endif
344 #if defined(_CRAYC)
345 #  if defined(_RELEASE_PATCHLEVEL)
346 #    define HEDLEY_CRAY_VERSION HEDLEY_VERSION_ENCODE(_RELEASE_MAJOR, _RELEASE_MINOR, _RELEASE_PATCHLEVEL)
347 #  else
348 #    define HEDLEY_CRAY_VERSION HEDLEY_VERSION_ENCODE(_RELEASE_MAJOR, _RELEASE_MINOR, 0)
349 #  endif
350 #endif
351 
352 #if defined(HEDLEY_CRAY_VERSION_CHECK)
353 #  undef HEDLEY_CRAY_VERSION_CHECK
354 #endif
355 #if defined(HEDLEY_CRAY_VERSION)
356 #  define HEDLEY_CRAY_VERSION_CHECK(major,minor,patch) (HEDLEY_CRAY_VERSION >= HEDLEY_VERSION_ENCODE(major, minor, patch))
357 #else
358 #  define HEDLEY_CRAY_VERSION_CHECK(major,minor,patch) (0)
359 #endif
360 
361 #if defined(HEDLEY_IAR_VERSION)
362 #  undef HEDLEY_IAR_VERSION
363 #endif
364 #if defined(__IAR_SYSTEMS_ICC__)
365 #  if __VER__ > 1000
366 #    define HEDLEY_IAR_VERSION HEDLEY_VERSION_ENCODE((__VER__ / 1000000), ((__VER__ / 1000) % 1000), (__VER__ % 1000))
367 #  else
368 #    define HEDLEY_IAR_VERSION HEDLEY_VERSION_ENCODE(VER / 100, __VER__ % 100, 0)
369 #  endif
370 #endif
371 
372 #if defined(HEDLEY_IAR_VERSION_CHECK)
373 #  undef HEDLEY_IAR_VERSION_CHECK
374 #endif
375 #if defined(HEDLEY_IAR_VERSION)
376 #  define HEDLEY_IAR_VERSION_CHECK(major,minor,patch) (HEDLEY_IAR_VERSION >= HEDLEY_VERSION_ENCODE(major, minor, patch))
377 #else
378 #  define HEDLEY_IAR_VERSION_CHECK(major,minor,patch) (0)
379 #endif
380 
381 #if defined(HEDLEY_TINYC_VERSION)
382 #  undef HEDLEY_TINYC_VERSION
383 #endif
384 #if defined(__TINYC__)
385 #  define HEDLEY_TINYC_VERSION HEDLEY_VERSION_ENCODE(__TINYC__ / 1000, (__TINYC__ / 100) % 10, __TINYC__ % 100)
386 #endif
387 
388 #if defined(HEDLEY_TINYC_VERSION_CHECK)
389 #  undef HEDLEY_TINYC_VERSION_CHECK
390 #endif
391 #if defined(HEDLEY_TINYC_VERSION)
392 #  define HEDLEY_TINYC_VERSION_CHECK(major,minor,patch) (HEDLEY_TINYC_VERSION >= HEDLEY_VERSION_ENCODE(major, minor, patch))
393 #else
394 #  define HEDLEY_TINYC_VERSION_CHECK(major,minor,patch) (0)
395 #endif
396 
397 #if defined(HEDLEY_DMC_VERSION)
398 #  undef HEDLEY_DMC_VERSION
399 #endif
400 #if defined(__DMC__)
401 #  define HEDLEY_DMC_VERSION HEDLEY_VERSION_ENCODE(__DMC__ >> 8, (__DMC__ >> 4) & 0xf, __DMC__ & 0xf)
402 #endif
403 
404 #if defined(HEDLEY_DMC_VERSION_CHECK)
405 #  undef HEDLEY_DMC_VERSION_CHECK
406 #endif
407 #if defined(HEDLEY_DMC_VERSION)
408 #  define HEDLEY_DMC_VERSION_CHECK(major,minor,patch) (HEDLEY_DMC_VERSION >= HEDLEY_VERSION_ENCODE(major, minor, patch))
409 #else
410 #  define HEDLEY_DMC_VERSION_CHECK(major,minor,patch) (0)
411 #endif
412 
413 #if defined(HEDLEY_COMPCERT_VERSION)
414 #  undef HEDLEY_COMPCERT_VERSION
415 #endif
416 #if defined(__COMPCERT_VERSION__)
417 #  define HEDLEY_COMPCERT_VERSION HEDLEY_VERSION_ENCODE(__COMPCERT_VERSION__ / 10000, (__COMPCERT_VERSION__ / 100) % 100, __COMPCERT_VERSION__ % 100)
418 #endif
419 
420 #if defined(HEDLEY_COMPCERT_VERSION_CHECK)
421 #  undef HEDLEY_COMPCERT_VERSION_CHECK
422 #endif
423 #if defined(HEDLEY_COMPCERT_VERSION)
424 #  define HEDLEY_COMPCERT_VERSION_CHECK(major,minor,patch) (HEDLEY_COMPCERT_VERSION >= HEDLEY_VERSION_ENCODE(major, minor, patch))
425 #else
426 #  define HEDLEY_COMPCERT_VERSION_CHECK(major,minor,patch) (0)
427 #endif
428 
429 #if defined(HEDLEY_PELLES_VERSION)
430 #  undef HEDLEY_PELLES_VERSION
431 #endif
432 #if defined(__POCC__)
433 #  define HEDLEY_PELLES_VERSION HEDLEY_VERSION_ENCODE(__POCC__ / 100, __POCC__ % 100, 0)
434 #endif
435 
436 #if defined(HEDLEY_PELLES_VERSION_CHECK)
437 #  undef HEDLEY_PELLES_VERSION_CHECK
438 #endif
439 #if defined(HEDLEY_PELLES_VERSION)
440 #  define HEDLEY_PELLES_VERSION_CHECK(major,minor,patch) (HEDLEY_PELLES_VERSION >= HEDLEY_VERSION_ENCODE(major, minor, patch))
441 #else
442 #  define HEDLEY_PELLES_VERSION_CHECK(major,minor,patch) (0)
443 #endif
444 
445 #if defined(HEDLEY_GCC_VERSION)
446 #  undef HEDLEY_GCC_VERSION
447 #endif
448 #if \
449   defined(HEDLEY_GNUC_VERSION) && \
450   !defined(__clang__) && \
451   !defined(HEDLEY_INTEL_VERSION) && \
452   !defined(HEDLEY_PGI_VERSION) && \
453   !defined(HEDLEY_ARM_VERSION) && \
454   !defined(HEDLEY_TI_VERSION) && \
455   !defined(HEDLEY_TI_ARMCL_VERSION) && \
456   !defined(HEDLEY_TI_CL430_VERSION) && \
457   !defined(HEDLEY_TI_CL2000_VERSION) && \
458   !defined(HEDLEY_TI_CL6X_VERSION) && \
459   !defined(HEDLEY_TI_CL7X_VERSION) && \
460   !defined(HEDLEY_TI_CLPRU_VERSION) && \
461   !defined(__COMPCERT__)
462 #  define HEDLEY_GCC_VERSION HEDLEY_GNUC_VERSION
463 #endif
464 
465 #if defined(HEDLEY_GCC_VERSION_CHECK)
466 #  undef HEDLEY_GCC_VERSION_CHECK
467 #endif
468 #if defined(HEDLEY_GCC_VERSION)
469 #  define HEDLEY_GCC_VERSION_CHECK(major,minor,patch) (HEDLEY_GCC_VERSION >= HEDLEY_VERSION_ENCODE(major, minor, patch))
470 #else
471 #  define HEDLEY_GCC_VERSION_CHECK(major,minor,patch) (0)
472 #endif
473 
474 #if defined(HEDLEY_HAS_ATTRIBUTE)
475 #  undef HEDLEY_HAS_ATTRIBUTE
476 #endif
477 #if defined(__has_attribute)
478 #  define HEDLEY_HAS_ATTRIBUTE(attribute) __has_attribute(attribute)
479 #else
480 #  define HEDLEY_HAS_ATTRIBUTE(attribute) (0)
481 #endif
482 
483 #if defined(HEDLEY_GNUC_HAS_ATTRIBUTE)
484 #  undef HEDLEY_GNUC_HAS_ATTRIBUTE
485 #endif
486 #if defined(__has_attribute)
487 #  define HEDLEY_GNUC_HAS_ATTRIBUTE(attribute,major,minor,patch) __has_attribute(attribute)
488 #else
489 #  define HEDLEY_GNUC_HAS_ATTRIBUTE(attribute,major,minor,patch) HEDLEY_GNUC_VERSION_CHECK(major,minor,patch)
490 #endif
491 
492 #if defined(HEDLEY_GCC_HAS_ATTRIBUTE)
493 #  undef HEDLEY_GCC_HAS_ATTRIBUTE
494 #endif
495 #if defined(__has_attribute)
496 #  define HEDLEY_GCC_HAS_ATTRIBUTE(attribute,major,minor,patch) __has_attribute(attribute)
497 #else
498 #  define HEDLEY_GCC_HAS_ATTRIBUTE(attribute,major,minor,patch) HEDLEY_GCC_VERSION_CHECK(major,minor,patch)
499 #endif
500 
501 #if defined(HEDLEY_HAS_CPP_ATTRIBUTE)
502 #  undef HEDLEY_HAS_CPP_ATTRIBUTE
503 #endif
504 #if \
505   defined(__has_cpp_attribute) && \
506   defined(__cplusplus) && \
507   (!defined(HEDLEY_SUNPRO_VERSION) || HEDLEY_SUNPRO_VERSION_CHECK(5,15,0))
508 #  define HEDLEY_HAS_CPP_ATTRIBUTE(attribute) __has_cpp_attribute(attribute)
509 #else
510 #  define HEDLEY_HAS_CPP_ATTRIBUTE(attribute) (0)
511 #endif
512 
513 #if defined(HEDLEY_HAS_CPP_ATTRIBUTE_NS)
514 #  undef HEDLEY_HAS_CPP_ATTRIBUTE_NS
515 #endif
516 #if !defined(__cplusplus) || !defined(__has_cpp_attribute)
517 #  define HEDLEY_HAS_CPP_ATTRIBUTE_NS(ns,attribute) (0)
518 #elif \
519   !defined(HEDLEY_PGI_VERSION) && \
520   !defined(HEDLEY_IAR_VERSION) && \
521   (!defined(HEDLEY_SUNPRO_VERSION) || HEDLEY_SUNPRO_VERSION_CHECK(5,15,0)) && \
522   (!defined(HEDLEY_MSVC_VERSION) || HEDLEY_MSVC_VERSION_CHECK(19,20,0))
523 #  define HEDLEY_HAS_CPP_ATTRIBUTE_NS(ns,attribute) HEDLEY_HAS_CPP_ATTRIBUTE(ns::attribute)
524 #else
525 #  define HEDLEY_HAS_CPP_ATTRIBUTE_NS(ns,attribute) (0)
526 #endif
527 
528 #if defined(HEDLEY_GNUC_HAS_CPP_ATTRIBUTE)
529 #  undef HEDLEY_GNUC_HAS_CPP_ATTRIBUTE
530 #endif
531 #if defined(__has_cpp_attribute) && defined(__cplusplus)
532 #  define HEDLEY_GNUC_HAS_CPP_ATTRIBUTE(attribute,major,minor,patch) __has_cpp_attribute(attribute)
533 #else
534 #  define HEDLEY_GNUC_HAS_CPP_ATTRIBUTE(attribute,major,minor,patch) HEDLEY_GNUC_VERSION_CHECK(major,minor,patch)
535 #endif
536 
537 #if defined(HEDLEY_GCC_HAS_CPP_ATTRIBUTE)
538 #  undef HEDLEY_GCC_HAS_CPP_ATTRIBUTE
539 #endif
540 #if defined(__has_cpp_attribute) && defined(__cplusplus)
541 #  define HEDLEY_GCC_HAS_CPP_ATTRIBUTE(attribute,major,minor,patch) __has_cpp_attribute(attribute)
542 #else
543 #  define HEDLEY_GCC_HAS_CPP_ATTRIBUTE(attribute,major,minor,patch) HEDLEY_GCC_VERSION_CHECK(major,minor,patch)
544 #endif
545 
546 #if defined(HEDLEY_HAS_BUILTIN)
547 #  undef HEDLEY_HAS_BUILTIN
548 #endif
549 #if defined(__has_builtin)
550 #  define HEDLEY_HAS_BUILTIN(builtin) __has_builtin(builtin)
551 #else
552 #  define HEDLEY_HAS_BUILTIN(builtin) (0)
553 #endif
554 
555 #if defined(HEDLEY_GNUC_HAS_BUILTIN)
556 #  undef HEDLEY_GNUC_HAS_BUILTIN
557 #endif
558 #if defined(__has_builtin)
559 #  define HEDLEY_GNUC_HAS_BUILTIN(builtin,major,minor,patch) __has_builtin(builtin)
560 #else
561 #  define HEDLEY_GNUC_HAS_BUILTIN(builtin,major,minor,patch) HEDLEY_GNUC_VERSION_CHECK(major,minor,patch)
562 #endif
563 
564 #if defined(HEDLEY_GCC_HAS_BUILTIN)
565 #  undef HEDLEY_GCC_HAS_BUILTIN
566 #endif
567 #if defined(__has_builtin)
568 #  define HEDLEY_GCC_HAS_BUILTIN(builtin,major,minor,patch) __has_builtin(builtin)
569 #else
570 #  define HEDLEY_GCC_HAS_BUILTIN(builtin,major,minor,patch) HEDLEY_GCC_VERSION_CHECK(major,minor,patch)
571 #endif
572 
573 #if defined(HEDLEY_HAS_FEATURE)
574 #  undef HEDLEY_HAS_FEATURE
575 #endif
576 #if defined(__has_feature)
577 #  define HEDLEY_HAS_FEATURE(feature) __has_feature(feature)
578 #else
579 #  define HEDLEY_HAS_FEATURE(feature) (0)
580 #endif
581 
582 #if defined(HEDLEY_GNUC_HAS_FEATURE)
583 #  undef HEDLEY_GNUC_HAS_FEATURE
584 #endif
585 #if defined(__has_feature)
586 #  define HEDLEY_GNUC_HAS_FEATURE(feature,major,minor,patch) __has_feature(feature)
587 #else
588 #  define HEDLEY_GNUC_HAS_FEATURE(feature,major,minor,patch) HEDLEY_GNUC_VERSION_CHECK(major,minor,patch)
589 #endif
590 
591 #if defined(HEDLEY_GCC_HAS_FEATURE)
592 #  undef HEDLEY_GCC_HAS_FEATURE
593 #endif
594 #if defined(__has_feature)
595 #  define HEDLEY_GCC_HAS_FEATURE(feature,major,minor,patch) __has_feature(feature)
596 #else
597 #  define HEDLEY_GCC_HAS_FEATURE(feature,major,minor,patch) HEDLEY_GCC_VERSION_CHECK(major,minor,patch)
598 #endif
599 
600 #if defined(HEDLEY_HAS_EXTENSION)
601 #  undef HEDLEY_HAS_EXTENSION
602 #endif
603 #if defined(__has_extension)
604 #  define HEDLEY_HAS_EXTENSION(extension) __has_extension(extension)
605 #else
606 #  define HEDLEY_HAS_EXTENSION(extension) (0)
607 #endif
608 
609 #if defined(HEDLEY_GNUC_HAS_EXTENSION)
610 #  undef HEDLEY_GNUC_HAS_EXTENSION
611 #endif
612 #if defined(__has_extension)
613 #  define HEDLEY_GNUC_HAS_EXTENSION(extension,major,minor,patch) __has_extension(extension)
614 #else
615 #  define HEDLEY_GNUC_HAS_EXTENSION(extension,major,minor,patch) HEDLEY_GNUC_VERSION_CHECK(major,minor,patch)
616 #endif
617 
618 #if defined(HEDLEY_GCC_HAS_EXTENSION)
619 #  undef HEDLEY_GCC_HAS_EXTENSION
620 #endif
621 #if defined(__has_extension)
622 #  define HEDLEY_GCC_HAS_EXTENSION(extension,major,minor,patch) __has_extension(extension)
623 #else
624 #  define HEDLEY_GCC_HAS_EXTENSION(extension,major,minor,patch) HEDLEY_GCC_VERSION_CHECK(major,minor,patch)
625 #endif
626 
627 #if defined(HEDLEY_HAS_DECLSPEC_ATTRIBUTE)
628 #  undef HEDLEY_HAS_DECLSPEC_ATTRIBUTE
629 #endif
630 #if defined(__has_declspec_attribute)
631 #  define HEDLEY_HAS_DECLSPEC_ATTRIBUTE(attribute) __has_declspec_attribute(attribute)
632 #else
633 #  define HEDLEY_HAS_DECLSPEC_ATTRIBUTE(attribute) (0)
634 #endif
635 
636 #if defined(HEDLEY_GNUC_HAS_DECLSPEC_ATTRIBUTE)
637 #  undef HEDLEY_GNUC_HAS_DECLSPEC_ATTRIBUTE
638 #endif
639 #if defined(__has_declspec_attribute)
640 #  define HEDLEY_GNUC_HAS_DECLSPEC_ATTRIBUTE(attribute,major,minor,patch) __has_declspec_attribute(attribute)
641 #else
642 #  define HEDLEY_GNUC_HAS_DECLSPEC_ATTRIBUTE(attribute,major,minor,patch) HEDLEY_GNUC_VERSION_CHECK(major,minor,patch)
643 #endif
644 
645 #if defined(HEDLEY_GCC_HAS_DECLSPEC_ATTRIBUTE)
646 #  undef HEDLEY_GCC_HAS_DECLSPEC_ATTRIBUTE
647 #endif
648 #if defined(__has_declspec_attribute)
649 #  define HEDLEY_GCC_HAS_DECLSPEC_ATTRIBUTE(attribute,major,minor,patch) __has_declspec_attribute(attribute)
650 #else
651 #  define HEDLEY_GCC_HAS_DECLSPEC_ATTRIBUTE(attribute,major,minor,patch) HEDLEY_GCC_VERSION_CHECK(major,minor,patch)
652 #endif
653 
654 #if defined(HEDLEY_HAS_WARNING)
655 #  undef HEDLEY_HAS_WARNING
656 #endif
657 #if defined(__has_warning)
658 #  define HEDLEY_HAS_WARNING(warning) __has_warning(warning)
659 #else
660 #  define HEDLEY_HAS_WARNING(warning) (0)
661 #endif
662 
663 #if defined(HEDLEY_GNUC_HAS_WARNING)
664 #  undef HEDLEY_GNUC_HAS_WARNING
665 #endif
666 #if defined(__has_warning)
667 #  define HEDLEY_GNUC_HAS_WARNING(warning,major,minor,patch) __has_warning(warning)
668 #else
669 #  define HEDLEY_GNUC_HAS_WARNING(warning,major,minor,patch) HEDLEY_GNUC_VERSION_CHECK(major,minor,patch)
670 #endif
671 
672 #if defined(HEDLEY_GCC_HAS_WARNING)
673 #  undef HEDLEY_GCC_HAS_WARNING
674 #endif
675 #if defined(__has_warning)
676 #  define HEDLEY_GCC_HAS_WARNING(warning,major,minor,patch) __has_warning(warning)
677 #else
678 #  define HEDLEY_GCC_HAS_WARNING(warning,major,minor,patch) HEDLEY_GCC_VERSION_CHECK(major,minor,patch)
679 #endif
680 
681 /* HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_ is for
682    HEDLEY INTERNAL USE ONLY.  API subject to change without notice. */
683 #if defined(HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_)
684 #  undef HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_
685 #endif
686 #if defined(__cplusplus)
687 #  if HEDLEY_HAS_WARNING("-Wc++98-compat")
688 #    if HEDLEY_HAS_WARNING("-Wc++17-extensions")
689 #      define HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_(xpr) \
690          HEDLEY_DIAGNOSTIC_PUSH \
691          _Pragma("clang diagnostic ignored \"-Wc++98-compat\"") \
692          _Pragma("clang diagnostic ignored \"-Wc++17-extensions\"") \
693          xpr \
694          HEDLEY_DIAGNOSTIC_POP
695 #    else
696 #      define HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_(xpr) \
697          HEDLEY_DIAGNOSTIC_PUSH \
698          _Pragma("clang diagnostic ignored \"-Wc++98-compat\"") \
699          xpr \
700          HEDLEY_DIAGNOSTIC_POP
701 #    endif
702 #  endif
703 #endif
704 #if !defined(HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_)
705 #  define HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_(x) x
706 #endif
707 
708 #if defined(HEDLEY_CONST_CAST)
709 #  undef HEDLEY_CONST_CAST
710 #endif
711 #if defined(__cplusplus)
712 #  define HEDLEY_CONST_CAST(T, expr) (const_cast<T>(expr))
713 #elif \
714   HEDLEY_HAS_WARNING("-Wcast-qual") || \
715   HEDLEY_GCC_VERSION_CHECK(4,6,0) || \
716   HEDLEY_INTEL_VERSION_CHECK(13,0,0)
717 #  define HEDLEY_CONST_CAST(T, expr) (__extension__ ({ \
718       HEDLEY_DIAGNOSTIC_PUSH \
719       HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL \
720       ((T) (expr)); \
721       HEDLEY_DIAGNOSTIC_POP \
722     }))
723 #else
724 #  define HEDLEY_CONST_CAST(T, expr) ((T) (expr))
725 #endif
726 
727 #if defined(HEDLEY_REINTERPRET_CAST)
728 #  undef HEDLEY_REINTERPRET_CAST
729 #endif
730 #if defined(__cplusplus)
731 #  define HEDLEY_REINTERPRET_CAST(T, expr) (reinterpret_cast<T>(expr))
732 #else
733 #  define HEDLEY_REINTERPRET_CAST(T, expr) ((T) (expr))
734 #endif
735 
736 #if defined(HEDLEY_STATIC_CAST)
737 #  undef HEDLEY_STATIC_CAST
738 #endif
739 #if defined(__cplusplus)
740 #  define HEDLEY_STATIC_CAST(T, expr) (static_cast<T>(expr))
741 #else
742 #  define HEDLEY_STATIC_CAST(T, expr) ((T) (expr))
743 #endif
744 
745 #if defined(HEDLEY_CPP_CAST)
746 #  undef HEDLEY_CPP_CAST
747 #endif
748 #if defined(__cplusplus)
749 #  if HEDLEY_HAS_WARNING("-Wold-style-cast")
750 #    define HEDLEY_CPP_CAST(T, expr) \
751        HEDLEY_DIAGNOSTIC_PUSH \
752        _Pragma("clang diagnostic ignored \"-Wold-style-cast\"") \
753        ((T) (expr)) \
754        HEDLEY_DIAGNOSTIC_POP
755 #  elif HEDLEY_IAR_VERSION_CHECK(8,3,0)
756 #    define HEDLEY_CPP_CAST(T, expr) \
757        HEDLEY_DIAGNOSTIC_PUSH \
758        _Pragma("diag_suppress=Pe137") \
759        HEDLEY_DIAGNOSTIC_POP \
760 #  else
761 #    define HEDLEY_CPP_CAST(T, expr) ((T) (expr))
762 #  endif
763 #else
764 #  define HEDLEY_CPP_CAST(T, expr) (expr)
765 #endif
766 
767 #if \
768   (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)) || \
769   defined(__clang__) || \
770   HEDLEY_GCC_VERSION_CHECK(3,0,0) || \
771   HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \
772   HEDLEY_IAR_VERSION_CHECK(8,0,0) || \
773   HEDLEY_PGI_VERSION_CHECK(18,4,0) || \
774   HEDLEY_ARM_VERSION_CHECK(4,1,0) || \
775   HEDLEY_TI_VERSION_CHECK(15,12,0) || \
776   HEDLEY_TI_ARMCL_VERSION_CHECK(4,7,0) || \
777   HEDLEY_TI_CL430_VERSION_CHECK(2,0,1) || \
778   HEDLEY_TI_CL2000_VERSION_CHECK(6,1,0) || \
779   HEDLEY_TI_CL6X_VERSION_CHECK(7,0,0) || \
780   HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \
781   HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) || \
782   HEDLEY_CRAY_VERSION_CHECK(5,0,0) || \
783   HEDLEY_TINYC_VERSION_CHECK(0,9,17) || \
784   HEDLEY_SUNPRO_VERSION_CHECK(8,0,0) || \
785   (HEDLEY_IBM_VERSION_CHECK(10,1,0) && defined(__C99_PRAGMA_OPERATOR))
786 #  define HEDLEY_PRAGMA(value) _Pragma(#value)
787 #elif HEDLEY_MSVC_VERSION_CHECK(15,0,0)
788 #  define HEDLEY_PRAGMA(value) __pragma(value)
789 #else
790 #  define HEDLEY_PRAGMA(value)
791 #endif
792 
793 #if defined(HEDLEY_DIAGNOSTIC_PUSH)
794 #  undef HEDLEY_DIAGNOSTIC_PUSH
795 #endif
796 #if defined(HEDLEY_DIAGNOSTIC_POP)
797 #  undef HEDLEY_DIAGNOSTIC_POP
798 #endif
799 #if defined(__clang__)
800 #  define HEDLEY_DIAGNOSTIC_PUSH _Pragma("clang diagnostic push")
801 #  define HEDLEY_DIAGNOSTIC_POP _Pragma("clang diagnostic pop")
802 #elif HEDLEY_INTEL_VERSION_CHECK(13,0,0)
803 #  define HEDLEY_DIAGNOSTIC_PUSH _Pragma("warning(push)")
804 #  define HEDLEY_DIAGNOSTIC_POP _Pragma("warning(pop)")
805 #elif HEDLEY_GCC_VERSION_CHECK(4,6,0)
806 #  define HEDLEY_DIAGNOSTIC_PUSH _Pragma("GCC diagnostic push")
807 #  define HEDLEY_DIAGNOSTIC_POP _Pragma("GCC diagnostic pop")
808 #elif HEDLEY_MSVC_VERSION_CHECK(15,0,0)
809 #  define HEDLEY_DIAGNOSTIC_PUSH __pragma(warning(push))
810 #  define HEDLEY_DIAGNOSTIC_POP __pragma(warning(pop))
811 #elif HEDLEY_ARM_VERSION_CHECK(5,6,0)
812 #  define HEDLEY_DIAGNOSTIC_PUSH _Pragma("push")
813 #  define HEDLEY_DIAGNOSTIC_POP _Pragma("pop")
814 #elif \
815     HEDLEY_TI_VERSION_CHECK(15,12,0) || \
816     HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \
817     HEDLEY_TI_CL430_VERSION_CHECK(4,4,0) || \
818     HEDLEY_TI_CL6X_VERSION_CHECK(8,1,0) || \
819     HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \
820     HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0)
821 #  define HEDLEY_DIAGNOSTIC_PUSH _Pragma("diag_push")
822 #  define HEDLEY_DIAGNOSTIC_POP _Pragma("diag_pop")
823 #elif HEDLEY_PELLES_VERSION_CHECK(2,90,0)
824 #  define HEDLEY_DIAGNOSTIC_PUSH _Pragma("warning(push)")
825 #  define HEDLEY_DIAGNOSTIC_POP _Pragma("warning(pop)")
826 #else
827 #  define HEDLEY_DIAGNOSTIC_PUSH
828 #  define HEDLEY_DIAGNOSTIC_POP
829 #endif
830 
831 #if defined(HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED)
832 #  undef HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED
833 #endif
834 #if HEDLEY_HAS_WARNING("-Wdeprecated-declarations")
835 #  define HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("clang diagnostic ignored \"-Wdeprecated-declarations\"")
836 #elif HEDLEY_INTEL_VERSION_CHECK(13,0,0)
837 #  define HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("warning(disable:1478 1786)")
838 #elif HEDLEY_PGI_VERSION_CHECK(17,10,0)
839 #  define HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("diag_suppress 1215,1444")
840 #elif HEDLEY_GCC_VERSION_CHECK(4,3,0)
841 #  define HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"")
842 #elif HEDLEY_MSVC_VERSION_CHECK(15,0,0)
843 #  define HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED __pragma(warning(disable:4996))
844 #elif \
845     HEDLEY_TI_VERSION_CHECK(15,12,0) || \
846     (HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \
847     HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \
848     (HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \
849     HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \
850     (HEDLEY_TI_CL430_VERSION_CHECK(4,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \
851     HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \
852     (HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \
853     HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) || \
854     HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \
855     HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0)
856 #  define HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("diag_suppress 1291,1718")
857 #elif HEDLEY_SUNPRO_VERSION_CHECK(5,13,0) && !defined(__cplusplus)
858 #  define HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("error_messages(off,E_DEPRECATED_ATT,E_DEPRECATED_ATT_MESS)")
859 #elif HEDLEY_SUNPRO_VERSION_CHECK(5,13,0) && defined(__cplusplus)
860 #  define HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("error_messages(off,symdeprecated,symdeprecated2)")
861 #elif HEDLEY_IAR_VERSION_CHECK(8,0,0)
862 #  define HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("diag_suppress=Pe1444,Pe1215")
863 #elif HEDLEY_PELLES_VERSION_CHECK(2,90,0)
864 #  define HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("warn(disable:2241)")
865 #else
866 #  define HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED
867 #endif
868 
869 #if defined(HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS)
870 #  undef HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS
871 #endif
872 #if HEDLEY_HAS_WARNING("-Wunknown-pragmas")
873 #  define HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma("clang diagnostic ignored \"-Wunknown-pragmas\"")
874 #elif HEDLEY_INTEL_VERSION_CHECK(13,0,0)
875 #  define HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma("warning(disable:161)")
876 #elif HEDLEY_PGI_VERSION_CHECK(17,10,0)
877 #  define HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma("diag_suppress 1675")
878 #elif HEDLEY_GCC_VERSION_CHECK(4,3,0)
879 #  define HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma("GCC diagnostic ignored \"-Wunknown-pragmas\"")
880 #elif HEDLEY_MSVC_VERSION_CHECK(15,0,0)
881 #  define HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS __pragma(warning(disable:4068))
882 #elif \
883     HEDLEY_TI_VERSION_CHECK(16,9,0) || \
884     HEDLEY_TI_CL6X_VERSION_CHECK(8,0,0) || \
885     HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \
886     HEDLEY_TI_CLPRU_VERSION_CHECK(2,3,0)
887 #  define HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma("diag_suppress 163")
888 #elif HEDLEY_TI_CL6X_VERSION_CHECK(8,0,0)
889 #  define HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma("diag_suppress 163")
890 #elif HEDLEY_IAR_VERSION_CHECK(8,0,0)
891 #  define HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma("diag_suppress=Pe161")
892 #else
893 #  define HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS
894 #endif
895 
896 #if defined(HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES)
897 #  undef HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES
898 #endif
899 #if HEDLEY_HAS_WARNING("-Wunknown-attributes")
900 #  define HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma("clang diagnostic ignored \"-Wunknown-attributes\"")
901 #elif HEDLEY_GCC_VERSION_CHECK(4,6,0)
902 #  define HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"")
903 #elif HEDLEY_INTEL_VERSION_CHECK(17,0,0)
904 #  define HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma("warning(disable:1292)")
905 #elif HEDLEY_MSVC_VERSION_CHECK(19,0,0)
906 #  define HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES __pragma(warning(disable:5030))
907 #elif HEDLEY_PGI_VERSION_CHECK(17,10,0)
908 #  define HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma("diag_suppress 1097")
909 #elif HEDLEY_SUNPRO_VERSION_CHECK(5,14,0) && defined(__cplusplus)
910 #  define HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma("error_messages(off,attrskipunsup)")
911 #elif \
912     HEDLEY_TI_VERSION_CHECK(18,1,0) || \
913     HEDLEY_TI_CL6X_VERSION_CHECK(8,3,0) || \
914     HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0)
915 #  define HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma("diag_suppress 1173")
916 #elif HEDLEY_IAR_VERSION_CHECK(8,0,0)
917 #  define HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma("diag_suppress=Pe1097")
918 #else
919 #  define HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES
920 #endif
921 
922 #if defined(HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL)
923 #  undef HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL
924 #endif
925 #if HEDLEY_HAS_WARNING("-Wcast-qual")
926 #  define HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL _Pragma("clang diagnostic ignored \"-Wcast-qual\"")
927 #elif HEDLEY_INTEL_VERSION_CHECK(13,0,0)
928 #  define HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL _Pragma("warning(disable:2203 2331)")
929 #elif HEDLEY_GCC_VERSION_CHECK(3,0,0)
930 #  define HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL _Pragma("GCC diagnostic ignored \"-Wcast-qual\"")
931 #else
932 #  define HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL
933 #endif
934 
935 #if defined(HEDLEY_DEPRECATED)
936 #  undef HEDLEY_DEPRECATED
937 #endif
938 #if defined(HEDLEY_DEPRECATED_FOR)
939 #  undef HEDLEY_DEPRECATED_FOR
940 #endif
941 #if HEDLEY_MSVC_VERSION_CHECK(14,0,0)
942 #  define HEDLEY_DEPRECATED(since) __declspec(deprecated("Since " # since))
943 #  define HEDLEY_DEPRECATED_FOR(since, replacement) __declspec(deprecated("Since " #since "; use " #replacement))
944 #elif defined(__cplusplus) && (__cplusplus >= 201402L)
945 #  define HEDLEY_DEPRECATED(since) HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[deprecated("Since " #since)]])
946 #  define HEDLEY_DEPRECATED_FOR(since, replacement) HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[deprecated("Since " #since "; use " #replacement)]])
947 #elif \
948   HEDLEY_HAS_EXTENSION(attribute_deprecated_with_message) || \
949   HEDLEY_GCC_VERSION_CHECK(4,5,0) || \
950   HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \
951   HEDLEY_ARM_VERSION_CHECK(5,6,0) || \
952   HEDLEY_SUNPRO_VERSION_CHECK(5,13,0) || \
953   HEDLEY_PGI_VERSION_CHECK(17,10,0) || \
954   HEDLEY_TI_VERSION_CHECK(18,1,0) || \
955   HEDLEY_TI_ARMCL_VERSION_CHECK(18,1,0) || \
956   HEDLEY_TI_CL6X_VERSION_CHECK(8,3,0) || \
957   HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \
958   HEDLEY_TI_CLPRU_VERSION_CHECK(2,3,0)
959 #  define HEDLEY_DEPRECATED(since) __attribute__((__deprecated__("Since " #since)))
960 #  define HEDLEY_DEPRECATED_FOR(since, replacement) __attribute__((__deprecated__("Since " #since "; use " #replacement)))
961 #elif \
962   HEDLEY_HAS_ATTRIBUTE(deprecated) || \
963   HEDLEY_GCC_VERSION_CHECK(3,1,0) || \
964   HEDLEY_ARM_VERSION_CHECK(4,1,0) || \
965   HEDLEY_TI_VERSION_CHECK(15,12,0) || \
966   (HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \
967   HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \
968   (HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \
969   HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \
970   (HEDLEY_TI_CL430_VERSION_CHECK(4,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \
971   HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \
972   (HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \
973   HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) || \
974   HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \
975   HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0)
976 #  define HEDLEY_DEPRECATED(since) __attribute__((__deprecated__))
977 #  define HEDLEY_DEPRECATED_FOR(since, replacement) __attribute__((__deprecated__))
978 #elif \
979   HEDLEY_MSVC_VERSION_CHECK(13,10,0) || \
980   HEDLEY_PELLES_VERSION_CHECK(6,50,0)
981 #  define HEDLEY_DEPRECATED(since) __declspec(deprecated)
982 #  define HEDLEY_DEPRECATED_FOR(since, replacement) __declspec(deprecated)
983 #elif HEDLEY_IAR_VERSION_CHECK(8,0,0)
984 #  define HEDLEY_DEPRECATED(since) _Pragma("deprecated")
985 #  define HEDLEY_DEPRECATED_FOR(since, replacement) _Pragma("deprecated")
986 #else
987 #  define HEDLEY_DEPRECATED(since)
988 #  define HEDLEY_DEPRECATED_FOR(since, replacement)
989 #endif
990 
991 #if defined(HEDLEY_UNAVAILABLE)
992 #  undef HEDLEY_UNAVAILABLE
993 #endif
994 #if \
995   HEDLEY_HAS_ATTRIBUTE(warning) || \
996   HEDLEY_GCC_VERSION_CHECK(4,3,0) || \
997   HEDLEY_INTEL_VERSION_CHECK(13,0,0)
998 #  define HEDLEY_UNAVAILABLE(available_since) __attribute__((__warning__("Not available until " #available_since)))
999 #else
1000 #  define HEDLEY_UNAVAILABLE(available_since)
1001 #endif
1002 
1003 #if defined(HEDLEY_WARN_UNUSED_RESULT)
1004 #  undef HEDLEY_WARN_UNUSED_RESULT
1005 #endif
1006 #if defined(HEDLEY_WARN_UNUSED_RESULT_MSG)
1007 #  undef HEDLEY_WARN_UNUSED_RESULT_MSG
1008 #endif
1009 #if (HEDLEY_HAS_CPP_ATTRIBUTE(nodiscard) >= 201907L)
1010 #  define HEDLEY_WARN_UNUSED_RESULT HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[nodiscard]])
1011 #  define HEDLEY_WARN_UNUSED_RESULT_MSG(msg) HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[nodiscard(msg)]])
1012 #elif HEDLEY_HAS_CPP_ATTRIBUTE(nodiscard)
1013 #  define HEDLEY_WARN_UNUSED_RESULT HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[nodiscard]])
1014 #  define HEDLEY_WARN_UNUSED_RESULT_MSG(msg) HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[nodiscard]])
1015 #elif \
1016   HEDLEY_HAS_ATTRIBUTE(warn_unused_result) || \
1017   HEDLEY_GCC_VERSION_CHECK(3,4,0) || \
1018   HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \
1019   HEDLEY_TI_VERSION_CHECK(15,12,0) || \
1020   (HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \
1021   HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \
1022   (HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \
1023   HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \
1024   (HEDLEY_TI_CL430_VERSION_CHECK(4,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \
1025   HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \
1026   (HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \
1027   HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) || \
1028   HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \
1029   HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) || \
1030   (HEDLEY_SUNPRO_VERSION_CHECK(5,15,0) && defined(__cplusplus)) || \
1031   HEDLEY_PGI_VERSION_CHECK(17,10,0)
1032 #  define HEDLEY_WARN_UNUSED_RESULT __attribute__((__warn_unused_result__))
1033 #  define HEDLEY_WARN_UNUSED_RESULT_MSG(msg) __attribute__((__warn_unused_result__))
1034 #elif defined(_Check_return_) /* SAL */
1035 #  define HEDLEY_WARN_UNUSED_RESULT _Check_return_
1036 #  define HEDLEY_WARN_UNUSED_RESULT_MSG(msg) _Check_return_
1037 #else
1038 #  define HEDLEY_WARN_UNUSED_RESULT
1039 #  define HEDLEY_WARN_UNUSED_RESULT_MSG(msg)
1040 #endif
1041 
1042 #if defined(HEDLEY_SENTINEL)
1043 #  undef HEDLEY_SENTINEL
1044 #endif
1045 #if \
1046   HEDLEY_HAS_ATTRIBUTE(sentinel) || \
1047   HEDLEY_GCC_VERSION_CHECK(4,0,0) || \
1048   HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \
1049   HEDLEY_ARM_VERSION_CHECK(5,4,0)
1050 #  define HEDLEY_SENTINEL(position) __attribute__((__sentinel__(position)))
1051 #else
1052 #  define HEDLEY_SENTINEL(position)
1053 #endif
1054 
1055 #if defined(HEDLEY_NO_RETURN)
1056 #  undef HEDLEY_NO_RETURN
1057 #endif
1058 #if HEDLEY_IAR_VERSION_CHECK(8,0,0)
1059 #  define HEDLEY_NO_RETURN __noreturn
1060 #elif HEDLEY_INTEL_VERSION_CHECK(13,0,0)
1061 #  define HEDLEY_NO_RETURN __attribute__((__noreturn__))
1062 #elif defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L
1063 #  define HEDLEY_NO_RETURN _Noreturn
1064 #elif defined(__cplusplus) && (__cplusplus >= 201103L)
1065 #  define HEDLEY_NO_RETURN HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[noreturn]])
1066 #elif \
1067   HEDLEY_HAS_ATTRIBUTE(noreturn) || \
1068   HEDLEY_GCC_VERSION_CHECK(3,2,0) || \
1069   HEDLEY_SUNPRO_VERSION_CHECK(5,11,0) || \
1070   HEDLEY_ARM_VERSION_CHECK(4,1,0) || \
1071   HEDLEY_IBM_VERSION_CHECK(10,1,0) || \
1072   HEDLEY_TI_VERSION_CHECK(15,12,0) || \
1073   (HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \
1074   HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \
1075   (HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \
1076   HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \
1077   (HEDLEY_TI_CL430_VERSION_CHECK(4,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \
1078   HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \
1079   (HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \
1080   HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) || \
1081   HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \
1082   HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0)
1083 #  define HEDLEY_NO_RETURN __attribute__((__noreturn__))
1084 #elif HEDLEY_SUNPRO_VERSION_CHECK(5,10,0)
1085 #  define HEDLEY_NO_RETURN _Pragma("does_not_return")
1086 #elif HEDLEY_MSVC_VERSION_CHECK(13,10,0)
1087 #  define HEDLEY_NO_RETURN __declspec(noreturn)
1088 #elif HEDLEY_TI_CL6X_VERSION_CHECK(6,0,0) && defined(__cplusplus)
1089 #  define HEDLEY_NO_RETURN _Pragma("FUNC_NEVER_RETURNS;")
1090 #elif HEDLEY_COMPCERT_VERSION_CHECK(3,2,0)
1091 #  define HEDLEY_NO_RETURN __attribute((noreturn))
1092 #elif HEDLEY_PELLES_VERSION_CHECK(9,0,0)
1093 #  define HEDLEY_NO_RETURN __declspec(noreturn)
1094 #else
1095 #  define HEDLEY_NO_RETURN
1096 #endif
1097 
1098 #if defined(HEDLEY_NO_ESCAPE)
1099 #  undef HEDLEY_NO_ESCAPE
1100 #endif
1101 #if HEDLEY_HAS_ATTRIBUTE(noescape)
1102 #  define HEDLEY_NO_ESCAPE __attribute__((__noescape__))
1103 #else
1104 #  define HEDLEY_NO_ESCAPE
1105 #endif
1106 
1107 #if defined(HEDLEY_UNREACHABLE)
1108 #  undef HEDLEY_UNREACHABLE
1109 #endif
1110 #if defined(HEDLEY_UNREACHABLE_RETURN)
1111 #  undef HEDLEY_UNREACHABLE_RETURN
1112 #endif
1113 #if defined(HEDLEY_ASSUME)
1114 #  undef HEDLEY_ASSUME
1115 #endif
1116 #if \
1117   HEDLEY_MSVC_VERSION_CHECK(13,10,0) || \
1118   HEDLEY_INTEL_VERSION_CHECK(13,0,0)
1119 #  define HEDLEY_ASSUME(expr) __assume(expr)
1120 #elif HEDLEY_HAS_BUILTIN(__builtin_assume)
1121 #  define HEDLEY_ASSUME(expr) __builtin_assume(expr)
1122 #elif \
1123     HEDLEY_TI_CL2000_VERSION_CHECK(6,2,0) || \
1124     HEDLEY_TI_CL6X_VERSION_CHECK(4,0,0)
1125 #  if defined(__cplusplus)
1126 #    define HEDLEY_ASSUME(expr) std::_nassert(expr)
1127 #  else
1128 #    define HEDLEY_ASSUME(expr) _nassert(expr)
1129 #  endif
1130 #endif
1131 #if \
1132   (HEDLEY_HAS_BUILTIN(__builtin_unreachable) && (!defined(HEDLEY_ARM_VERSION))) || \
1133   HEDLEY_GCC_VERSION_CHECK(4,5,0) || \
1134   HEDLEY_PGI_VERSION_CHECK(18,10,0) || \
1135   HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \
1136   HEDLEY_IBM_VERSION_CHECK(13,1,5)
1137 #  define HEDLEY_UNREACHABLE() __builtin_unreachable()
1138 #elif defined(HEDLEY_ASSUME)
1139 #  define HEDLEY_UNREACHABLE() HEDLEY_ASSUME(0)
1140 #endif
1141 #if !defined(HEDLEY_ASSUME)
1142 #  if defined(HEDLEY_UNREACHABLE)
1143 #    define HEDLEY_ASSUME(expr) HEDLEY_STATIC_CAST(void, ((expr) ? 1 : (HEDLEY_UNREACHABLE(), 1)))
1144 #  else
1145 #    define HEDLEY_ASSUME(expr) HEDLEY_STATIC_CAST(void, expr)
1146 #  endif
1147 #endif
1148 #if defined(HEDLEY_UNREACHABLE)
1149 #  if  \
1150       HEDLEY_TI_CL2000_VERSION_CHECK(6,2,0) || \
1151       HEDLEY_TI_CL6X_VERSION_CHECK(4,0,0)
1152 #    define HEDLEY_UNREACHABLE_RETURN(value) return (HEDLEY_STATIC_CAST(void, HEDLEY_ASSUME(0)), (value))
1153 #  else
1154 #    define HEDLEY_UNREACHABLE_RETURN(value) HEDLEY_UNREACHABLE()
1155 #  endif
1156 #else
1157 #  define HEDLEY_UNREACHABLE_RETURN(value) return (value)
1158 #endif
1159 #if !defined(HEDLEY_UNREACHABLE)
1160 #  define HEDLEY_UNREACHABLE() HEDLEY_ASSUME(0)
1161 #endif
1162 
1163 HEDLEY_DIAGNOSTIC_PUSH
1164 #if HEDLEY_HAS_WARNING("-Wpedantic")
1165 #  pragma clang diagnostic ignored "-Wpedantic"
1166 #endif
1167 #if HEDLEY_HAS_WARNING("-Wc++98-compat-pedantic") && defined(__cplusplus)
1168 #  pragma clang diagnostic ignored "-Wc++98-compat-pedantic"
1169 #endif
1170 #if HEDLEY_GCC_HAS_WARNING("-Wvariadic-macros",4,0,0)
1171 #  if defined(__clang__)
1172 #    pragma clang diagnostic ignored "-Wvariadic-macros"
1173 #  elif defined(HEDLEY_GCC_VERSION)
1174 #    pragma GCC diagnostic ignored "-Wvariadic-macros"
1175 #  endif
1176 #endif
1177 #if defined(HEDLEY_NON_NULL)
1178 #  undef HEDLEY_NON_NULL
1179 #endif
1180 #if \
1181   HEDLEY_HAS_ATTRIBUTE(nonnull) || \
1182   HEDLEY_GCC_VERSION_CHECK(3,3,0) || \
1183   HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \
1184   HEDLEY_ARM_VERSION_CHECK(4,1,0)
1185 #  define HEDLEY_NON_NULL(...) __attribute__((__nonnull__(__VA_ARGS__)))
1186 #else
1187 #  define HEDLEY_NON_NULL(...)
1188 #endif
1189 HEDLEY_DIAGNOSTIC_POP
1190 
1191 #if defined(HEDLEY_PRINTF_FORMAT)
1192 #  undef HEDLEY_PRINTF_FORMAT
1193 #endif
1194 #if defined(__MINGW32__) && HEDLEY_GCC_HAS_ATTRIBUTE(format,4,4,0) && !defined(__USE_MINGW_ANSI_STDIO)
1195 #  define HEDLEY_PRINTF_FORMAT(string_idx,first_to_check) __attribute__((__format__(ms_printf, string_idx, first_to_check)))
1196 #elif defined(__MINGW32__) && HEDLEY_GCC_HAS_ATTRIBUTE(format,4,4,0) && defined(__USE_MINGW_ANSI_STDIO)
1197 #  define HEDLEY_PRINTF_FORMAT(string_idx,first_to_check) __attribute__((__format__(gnu_printf, string_idx, first_to_check)))
1198 #elif \
1199   HEDLEY_HAS_ATTRIBUTE(format) || \
1200   HEDLEY_GCC_VERSION_CHECK(3,1,0) || \
1201   HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \
1202   HEDLEY_ARM_VERSION_CHECK(5,6,0) || \
1203   HEDLEY_IBM_VERSION_CHECK(10,1,0) || \
1204   HEDLEY_TI_VERSION_CHECK(15,12,0) || \
1205   (HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \
1206   HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \
1207   (HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \
1208   HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \
1209   (HEDLEY_TI_CL430_VERSION_CHECK(4,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \
1210   HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \
1211   (HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \
1212   HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) || \
1213   HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \
1214   HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0)
1215 #  define HEDLEY_PRINTF_FORMAT(string_idx,first_to_check) __attribute__((__format__(__printf__, string_idx, first_to_check)))
1216 #elif HEDLEY_PELLES_VERSION_CHECK(6,0,0)
1217 #  define HEDLEY_PRINTF_FORMAT(string_idx,first_to_check) __declspec(vaformat(printf,string_idx,first_to_check))
1218 #else
1219 #  define HEDLEY_PRINTF_FORMAT(string_idx,first_to_check)
1220 #endif
1221 
1222 #if defined(HEDLEY_CONSTEXPR)
1223 #  undef HEDLEY_CONSTEXPR
1224 #endif
1225 #if defined(__cplusplus)
1226 #  if __cplusplus >= 201103L
1227 #    define HEDLEY_CONSTEXPR HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_(constexpr)
1228 #  endif
1229 #endif
1230 #if !defined(HEDLEY_CONSTEXPR)
1231 #  define HEDLEY_CONSTEXPR
1232 #endif
1233 
1234 #if defined(HEDLEY_PREDICT)
1235 #  undef HEDLEY_PREDICT
1236 #endif
1237 #if defined(HEDLEY_LIKELY)
1238 #  undef HEDLEY_LIKELY
1239 #endif
1240 #if defined(HEDLEY_UNLIKELY)
1241 #  undef HEDLEY_UNLIKELY
1242 #endif
1243 #if defined(HEDLEY_UNPREDICTABLE)
1244 #  undef HEDLEY_UNPREDICTABLE
1245 #endif
1246 #if HEDLEY_HAS_BUILTIN(__builtin_unpredictable)
1247 #  define HEDLEY_UNPREDICTABLE(expr) __builtin_unpredictable((expr))
1248 #endif
1249 #if \
1250   HEDLEY_HAS_BUILTIN(__builtin_expect_with_probability) || \
1251   HEDLEY_GCC_VERSION_CHECK(9,0,0)
1252 #  define HEDLEY_PREDICT(expr, value, probability) __builtin_expect_with_probability(  (expr), (value), (probability))
1253 #  define HEDLEY_PREDICT_TRUE(expr, probability)   __builtin_expect_with_probability(!!(expr),    1   , (probability))
1254 #  define HEDLEY_PREDICT_FALSE(expr, probability)  __builtin_expect_with_probability(!!(expr),    0   , (probability))
1255 #  define HEDLEY_LIKELY(expr)                      __builtin_expect                 (!!(expr),    1                  )
1256 #  define HEDLEY_UNLIKELY(expr)                    __builtin_expect                 (!!(expr),    0                  )
1257 #elif \
1258   HEDLEY_HAS_BUILTIN(__builtin_expect) || \
1259   HEDLEY_GCC_VERSION_CHECK(3,0,0) || \
1260   HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \
1261   (HEDLEY_SUNPRO_VERSION_CHECK(5,15,0) && defined(__cplusplus)) || \
1262   HEDLEY_ARM_VERSION_CHECK(4,1,0) || \
1263   HEDLEY_IBM_VERSION_CHECK(10,1,0) || \
1264   HEDLEY_TI_VERSION_CHECK(15,12,0) || \
1265   HEDLEY_TI_ARMCL_VERSION_CHECK(4,7,0) || \
1266   HEDLEY_TI_CL430_VERSION_CHECK(3,1,0) || \
1267   HEDLEY_TI_CL2000_VERSION_CHECK(6,1,0) || \
1268   HEDLEY_TI_CL6X_VERSION_CHECK(6,1,0) || \
1269   HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \
1270   HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) || \
1271   HEDLEY_TINYC_VERSION_CHECK(0,9,27) || \
1272   HEDLEY_CRAY_VERSION_CHECK(8,1,0)
1273 #  define HEDLEY_PREDICT(expr, expected, probability) \
1274      (((probability) >= 0.9) ? __builtin_expect((expr), (expected)) : (HEDLEY_STATIC_CAST(void, expected), (expr)))
1275 #  define HEDLEY_PREDICT_TRUE(expr, probability) \
1276      (__extension__ ({ \
1277        double hedley_probability_ = (probability); \
1278        ((hedley_probability_ >= 0.9) ? __builtin_expect(!!(expr), 1) : ((hedley_probability_ <= 0.1) ? __builtin_expect(!!(expr), 0) : !!(expr))); \
1279      }))
1280 #  define HEDLEY_PREDICT_FALSE(expr, probability) \
1281      (__extension__ ({ \
1282        double hedley_probability_ = (probability); \
1283        ((hedley_probability_ >= 0.9) ? __builtin_expect(!!(expr), 0) : ((hedley_probability_ <= 0.1) ? __builtin_expect(!!(expr), 1) : !!(expr))); \
1284      }))
1285 #  define HEDLEY_LIKELY(expr)   __builtin_expect(!!(expr), 1)
1286 #  define HEDLEY_UNLIKELY(expr) __builtin_expect(!!(expr), 0)
1287 #else
1288 #  define HEDLEY_PREDICT(expr, expected, probability) (HEDLEY_STATIC_CAST(void, expected), (expr))
1289 #  define HEDLEY_PREDICT_TRUE(expr, probability) (!!(expr))
1290 #  define HEDLEY_PREDICT_FALSE(expr, probability) (!!(expr))
1291 #  define HEDLEY_LIKELY(expr) (!!(expr))
1292 #  define HEDLEY_UNLIKELY(expr) (!!(expr))
1293 #endif
1294 #if !defined(HEDLEY_UNPREDICTABLE)
1295 #  define HEDLEY_UNPREDICTABLE(expr) HEDLEY_PREDICT(expr, 1, 0.5)
1296 #endif
1297 
1298 #if defined(HEDLEY_MALLOC)
1299 #  undef HEDLEY_MALLOC
1300 #endif
1301 #if \
1302   HEDLEY_HAS_ATTRIBUTE(malloc) || \
1303   HEDLEY_GCC_VERSION_CHECK(3,1,0) || \
1304   HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \
1305   HEDLEY_SUNPRO_VERSION_CHECK(5,11,0) || \
1306   HEDLEY_ARM_VERSION_CHECK(4,1,0) || \
1307   HEDLEY_IBM_VERSION_CHECK(12,1,0) || \
1308   HEDLEY_TI_VERSION_CHECK(15,12,0) || \
1309   (HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \
1310   HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \
1311   (HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \
1312   HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \
1313   (HEDLEY_TI_CL430_VERSION_CHECK(4,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \
1314   HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \
1315   (HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \
1316   HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) || \
1317   HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \
1318   HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0)
1319 #  define HEDLEY_MALLOC __attribute__((__malloc__))
1320 #elif HEDLEY_SUNPRO_VERSION_CHECK(5,10,0)
1321 #  define HEDLEY_MALLOC _Pragma("returns_new_memory")
1322 #elif HEDLEY_MSVC_VERSION_CHECK(14, 0, 0)
1323 #  define HEDLEY_MALLOC __declspec(restrict)
1324 #else
1325 #  define HEDLEY_MALLOC
1326 #endif
1327 
1328 #if defined(HEDLEY_PURE)
1329 #  undef HEDLEY_PURE
1330 #endif
1331 #if \
1332   HEDLEY_HAS_ATTRIBUTE(pure) || \
1333   HEDLEY_GCC_VERSION_CHECK(2,96,0) || \
1334   HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \
1335   HEDLEY_SUNPRO_VERSION_CHECK(5,11,0) || \
1336   HEDLEY_ARM_VERSION_CHECK(4,1,0) || \
1337   HEDLEY_IBM_VERSION_CHECK(10,1,0) || \
1338   HEDLEY_TI_VERSION_CHECK(15,12,0) || \
1339   (HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \
1340   HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \
1341   (HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \
1342   HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \
1343   (HEDLEY_TI_CL430_VERSION_CHECK(4,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \
1344   HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \
1345   (HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \
1346   HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) || \
1347   HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \
1348   HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) || \
1349   HEDLEY_PGI_VERSION_CHECK(17,10,0)
1350 #  define HEDLEY_PURE __attribute__((__pure__))
1351 #elif HEDLEY_SUNPRO_VERSION_CHECK(5,10,0)
1352 #  define HEDLEY_PURE _Pragma("does_not_write_global_data")
1353 #elif defined(__cplusplus) && \
1354     ( \
1355       HEDLEY_TI_CL430_VERSION_CHECK(2,0,1) || \
1356       HEDLEY_TI_CL6X_VERSION_CHECK(4,0,0) || \
1357       HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) \
1358     )
1359 #  define HEDLEY_PURE _Pragma("FUNC_IS_PURE;")
1360 #else
1361 #  define HEDLEY_PURE
1362 #endif
1363 
1364 #if defined(HEDLEY_CONST)
1365 #  undef HEDLEY_CONST
1366 #endif
1367 #if \
1368   HEDLEY_HAS_ATTRIBUTE(const) || \
1369   HEDLEY_GCC_VERSION_CHECK(2,5,0) || \
1370   HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \
1371   HEDLEY_SUNPRO_VERSION_CHECK(5,11,0) || \
1372   HEDLEY_ARM_VERSION_CHECK(4,1,0) || \
1373   HEDLEY_IBM_VERSION_CHECK(10,1,0) || \
1374   HEDLEY_TI_VERSION_CHECK(15,12,0) || \
1375   (HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \
1376   HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \
1377   (HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \
1378   HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \
1379   (HEDLEY_TI_CL430_VERSION_CHECK(4,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \
1380   HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \
1381   (HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \
1382   HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) || \
1383   HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \
1384   HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) || \
1385   HEDLEY_PGI_VERSION_CHECK(17,10,0)
1386 #  define HEDLEY_CONST __attribute__((__const__))
1387 #elif \
1388   HEDLEY_SUNPRO_VERSION_CHECK(5,10,0)
1389 #  define HEDLEY_CONST _Pragma("no_side_effect")
1390 #else
1391 #  define HEDLEY_CONST HEDLEY_PURE
1392 #endif
1393 
1394 #if defined(HEDLEY_RESTRICT)
1395 #  undef HEDLEY_RESTRICT
1396 #endif
1397 #if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) && !defined(__cplusplus)
1398 #  define HEDLEY_RESTRICT restrict
1399 #elif \
1400   HEDLEY_GCC_VERSION_CHECK(3,1,0) || \
1401   HEDLEY_MSVC_VERSION_CHECK(14,0,0) || \
1402   HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \
1403   HEDLEY_ARM_VERSION_CHECK(4,1,0) || \
1404   HEDLEY_IBM_VERSION_CHECK(10,1,0) || \
1405   HEDLEY_PGI_VERSION_CHECK(17,10,0) || \
1406   HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \
1407   HEDLEY_TI_CL2000_VERSION_CHECK(6,2,4) || \
1408   HEDLEY_TI_CL6X_VERSION_CHECK(8,1,0) || \
1409   HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \
1410   (HEDLEY_SUNPRO_VERSION_CHECK(5,14,0) && defined(__cplusplus)) || \
1411   HEDLEY_IAR_VERSION_CHECK(8,0,0) || \
1412   defined(__clang__)
1413 #  define HEDLEY_RESTRICT __restrict
1414 #elif HEDLEY_SUNPRO_VERSION_CHECK(5,3,0) && !defined(__cplusplus)
1415 #  define HEDLEY_RESTRICT _Restrict
1416 #else
1417 #  define HEDLEY_RESTRICT
1418 #endif
1419 
1420 #if defined(HEDLEY_INLINE)
1421 #  undef HEDLEY_INLINE
1422 #endif
1423 #if \
1424   (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)) || \
1425   (defined(__cplusplus) && (__cplusplus >= 199711L))
1426 #  define HEDLEY_INLINE inline
1427 #elif \
1428   defined(HEDLEY_GCC_VERSION) || \
1429   HEDLEY_ARM_VERSION_CHECK(6,2,0)
1430 #  define HEDLEY_INLINE __inline__
1431 #elif \
1432   HEDLEY_MSVC_VERSION_CHECK(12,0,0) || \
1433   HEDLEY_ARM_VERSION_CHECK(4,1,0) || \
1434   HEDLEY_TI_ARMCL_VERSION_CHECK(5,1,0) || \
1435   HEDLEY_TI_CL430_VERSION_CHECK(3,1,0) || \
1436   HEDLEY_TI_CL2000_VERSION_CHECK(6,2,0) || \
1437   HEDLEY_TI_CL6X_VERSION_CHECK(8,0,0) || \
1438   HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \
1439   HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0)
1440 #  define HEDLEY_INLINE __inline
1441 #else
1442 #  define HEDLEY_INLINE
1443 #endif
1444 
1445 #if defined(HEDLEY_ALWAYS_INLINE)
1446 #  undef HEDLEY_ALWAYS_INLINE
1447 #endif
1448 #if \
1449   HEDLEY_HAS_ATTRIBUTE(always_inline) || \
1450   HEDLEY_GCC_VERSION_CHECK(4,0,0) || \
1451   HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \
1452   HEDLEY_SUNPRO_VERSION_CHECK(5,11,0) || \
1453   HEDLEY_ARM_VERSION_CHECK(4,1,0) || \
1454   HEDLEY_IBM_VERSION_CHECK(10,1,0) || \
1455   HEDLEY_TI_VERSION_CHECK(15,12,0) || \
1456   (HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \
1457   HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \
1458   (HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \
1459   HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \
1460   (HEDLEY_TI_CL430_VERSION_CHECK(4,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \
1461   HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \
1462   (HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \
1463   HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) || \
1464   HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \
1465   HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0)
1466 #  define HEDLEY_ALWAYS_INLINE __attribute__((__always_inline__)) HEDLEY_INLINE
1467 #elif HEDLEY_MSVC_VERSION_CHECK(12,0,0)
1468 #  define HEDLEY_ALWAYS_INLINE __forceinline
1469 #elif defined(__cplusplus) && \
1470     ( \
1471       HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \
1472       HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \
1473       HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \
1474       HEDLEY_TI_CL6X_VERSION_CHECK(6,1,0) || \
1475       HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \
1476       HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) \
1477     )
1478 #  define HEDLEY_ALWAYS_INLINE _Pragma("FUNC_ALWAYS_INLINE;")
1479 #elif HEDLEY_IAR_VERSION_CHECK(8,0,0)
1480 #  define HEDLEY_ALWAYS_INLINE _Pragma("inline=forced")
1481 #else
1482 #  define HEDLEY_ALWAYS_INLINE HEDLEY_INLINE
1483 #endif
1484 
1485 #if defined(HEDLEY_NEVER_INLINE)
1486 #  undef HEDLEY_NEVER_INLINE
1487 #endif
1488 #if \
1489   HEDLEY_HAS_ATTRIBUTE(noinline) || \
1490   HEDLEY_GCC_VERSION_CHECK(4,0,0) || \
1491   HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \
1492   HEDLEY_SUNPRO_VERSION_CHECK(5,11,0) || \
1493   HEDLEY_ARM_VERSION_CHECK(4,1,0) || \
1494   HEDLEY_IBM_VERSION_CHECK(10,1,0) || \
1495   HEDLEY_TI_VERSION_CHECK(15,12,0) || \
1496   (HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \
1497   HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \
1498   (HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \
1499   HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \
1500   (HEDLEY_TI_CL430_VERSION_CHECK(4,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \
1501   HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \
1502   (HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \
1503   HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) || \
1504   HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \
1505   HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0)
1506 #  define HEDLEY_NEVER_INLINE __attribute__((__noinline__))
1507 #elif HEDLEY_MSVC_VERSION_CHECK(13,10,0)
1508 #  define HEDLEY_NEVER_INLINE __declspec(noinline)
1509 #elif HEDLEY_PGI_VERSION_CHECK(10,2,0)
1510 #  define HEDLEY_NEVER_INLINE _Pragma("noinline")
1511 #elif HEDLEY_TI_CL6X_VERSION_CHECK(6,0,0) && defined(__cplusplus)
1512 #  define HEDLEY_NEVER_INLINE _Pragma("FUNC_CANNOT_INLINE;")
1513 #elif HEDLEY_IAR_VERSION_CHECK(8,0,0)
1514 #  define HEDLEY_NEVER_INLINE _Pragma("inline=never")
1515 #elif HEDLEY_COMPCERT_VERSION_CHECK(3,2,0)
1516 #  define HEDLEY_NEVER_INLINE __attribute((noinline))
1517 #elif HEDLEY_PELLES_VERSION_CHECK(9,0,0)
1518 #  define HEDLEY_NEVER_INLINE __declspec(noinline)
1519 #else
1520 #  define HEDLEY_NEVER_INLINE
1521 #endif
1522 
1523 #if defined(HEDLEY_PRIVATE)
1524 #  undef HEDLEY_PRIVATE
1525 #endif
1526 #if defined(HEDLEY_PUBLIC)
1527 #  undef HEDLEY_PUBLIC
1528 #endif
1529 #if defined(HEDLEY_IMPORT)
1530 #  undef HEDLEY_IMPORT
1531 #endif
1532 #if defined(_WIN32) || defined(__CYGWIN__)
1533 #  define HEDLEY_PRIVATE
1534 #  define HEDLEY_PUBLIC   __declspec(dllexport)
1535 #  define HEDLEY_IMPORT   __declspec(dllimport)
1536 #else
1537 #  if \
1538     HEDLEY_HAS_ATTRIBUTE(visibility) || \
1539     HEDLEY_GCC_VERSION_CHECK(3,3,0) || \
1540     HEDLEY_SUNPRO_VERSION_CHECK(5,11,0) || \
1541     HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \
1542     HEDLEY_ARM_VERSION_CHECK(4,1,0) || \
1543     HEDLEY_IBM_VERSION_CHECK(13,1,0) || \
1544     ( \
1545       defined(__TI_EABI__) && \
1546       ( \
1547         (HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \
1548         HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) \
1549       ) \
1550     )
1551 #    define HEDLEY_PRIVATE __attribute__((__visibility__("hidden")))
1552 #    define HEDLEY_PUBLIC  __attribute__((__visibility__("default")))
1553 #  else
1554 #    define HEDLEY_PRIVATE
1555 #    define HEDLEY_PUBLIC
1556 #  endif
1557 #  define HEDLEY_IMPORT    extern
1558 #endif
1559 
1560 #if defined(HEDLEY_NO_THROW)
1561 #  undef HEDLEY_NO_THROW
1562 #endif
1563 #if \
1564   HEDLEY_HAS_ATTRIBUTE(nothrow) || \
1565   HEDLEY_GCC_VERSION_CHECK(3,3,0) || \
1566   HEDLEY_INTEL_VERSION_CHECK(13,0,0)
1567 #  define HEDLEY_NO_THROW __attribute__((__nothrow__))
1568 #elif \
1569   HEDLEY_MSVC_VERSION_CHECK(13,1,0) || \
1570   HEDLEY_ARM_VERSION_CHECK(4,1,0)
1571 #  define HEDLEY_NO_THROW __declspec(nothrow)
1572 #else
1573 #  define HEDLEY_NO_THROW
1574 #endif
1575 
1576 #if defined(HEDLEY_FALL_THROUGH)
1577 # undef HEDLEY_FALL_THROUGH
1578 #endif
1579 #if \
1580   HEDLEY_HAS_ATTRIBUTE(fallthrough) || \
1581   HEDLEY_GCC_VERSION_CHECK(7,0,0)
1582 #  define HEDLEY_FALL_THROUGH __attribute__((__fallthrough__))
1583 #elif HEDLEY_HAS_CPP_ATTRIBUTE_NS(clang,fallthrough)
1584 #  define HEDLEY_FALL_THROUGH HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[clang::fallthrough]])
1585 #elif HEDLEY_HAS_CPP_ATTRIBUTE(fallthrough)
1586 #  define HEDLEY_FALL_THROUGH HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[fallthrough]])
1587 #elif defined(__fallthrough) /* SAL */
1588 #  define HEDLEY_FALL_THROUGH __fallthrough
1589 #else
1590 #  define HEDLEY_FALL_THROUGH
1591 #endif
1592 
1593 #if defined(HEDLEY_RETURNS_NON_NULL)
1594 #  undef HEDLEY_RETURNS_NON_NULL
1595 #endif
1596 #if \
1597   HEDLEY_HAS_ATTRIBUTE(returns_nonnull) || \
1598   HEDLEY_GCC_VERSION_CHECK(4,9,0)
1599 #  define HEDLEY_RETURNS_NON_NULL __attribute__((__returns_nonnull__))
1600 #elif defined(_Ret_notnull_) /* SAL */
1601 #  define HEDLEY_RETURNS_NON_NULL _Ret_notnull_
1602 #else
1603 #  define HEDLEY_RETURNS_NON_NULL
1604 #endif
1605 
1606 #if defined(HEDLEY_ARRAY_PARAM)
1607 #  undef HEDLEY_ARRAY_PARAM
1608 #endif
1609 #if \
1610   defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) && \
1611   !defined(__STDC_NO_VLA__) && \
1612   !defined(__cplusplus) && \
1613   !defined(HEDLEY_PGI_VERSION) && \
1614   !defined(HEDLEY_TINYC_VERSION)
1615 #  define HEDLEY_ARRAY_PARAM(name) (name)
1616 #else
1617 #  define HEDLEY_ARRAY_PARAM(name)
1618 #endif
1619 
1620 #if defined(HEDLEY_IS_CONSTANT)
1621 #  undef HEDLEY_IS_CONSTANT
1622 #endif
1623 #if defined(HEDLEY_REQUIRE_CONSTEXPR)
1624 #  undef HEDLEY_REQUIRE_CONSTEXPR
1625 #endif
1626 /* HEDLEY_IS_CONSTEXPR_ is for
1627    HEDLEY INTERNAL USE ONLY.  API subject to change without notice. */
1628 #if defined(HEDLEY_IS_CONSTEXPR_)
1629 #  undef HEDLEY_IS_CONSTEXPR_
1630 #endif
1631 #if \
1632   HEDLEY_HAS_BUILTIN(__builtin_constant_p) || \
1633   HEDLEY_GCC_VERSION_CHECK(3,4,0) || \
1634   HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \
1635   HEDLEY_TINYC_VERSION_CHECK(0,9,19) || \
1636   HEDLEY_ARM_VERSION_CHECK(4,1,0) || \
1637   HEDLEY_IBM_VERSION_CHECK(13,1,0) || \
1638   HEDLEY_TI_CL6X_VERSION_CHECK(6,1,0) || \
1639   (HEDLEY_SUNPRO_VERSION_CHECK(5,10,0) && !defined(__cplusplus)) || \
1640   HEDLEY_CRAY_VERSION_CHECK(8,1,0)
1641 #  define HEDLEY_IS_CONSTANT(expr) __builtin_constant_p(expr)
1642 #endif
1643 #if !defined(__cplusplus)
1644 #  if \
1645        HEDLEY_HAS_BUILTIN(__builtin_types_compatible_p) || \
1646        HEDLEY_GCC_VERSION_CHECK(3,4,0) || \
1647        HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \
1648        HEDLEY_IBM_VERSION_CHECK(13,1,0) || \
1649        HEDLEY_CRAY_VERSION_CHECK(8,1,0) || \
1650        HEDLEY_ARM_VERSION_CHECK(5,4,0) || \
1651        HEDLEY_TINYC_VERSION_CHECK(0,9,24)
1652 #    if defined(__INTPTR_TYPE__)
1653 #      define HEDLEY_IS_CONSTEXPR_(expr) __builtin_types_compatible_p(__typeof__((1 ? (void*) ((__INTPTR_TYPE__) ((expr) * 0)) : (int*) 0)), int*)
1654 #    else
1655 #      include <stdint.h>
1656 #      define HEDLEY_IS_CONSTEXPR_(expr) __builtin_types_compatible_p(__typeof__((1 ? (void*) ((intptr_t) ((expr) * 0)) : (int*) 0)), int*)
1657 #    endif
1658 #  elif \
1659        ( \
1660           defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L) && \
1661           !defined(HEDLEY_SUNPRO_VERSION) && \
1662           !defined(HEDLEY_PGI_VERSION) && \
1663           !defined(HEDLEY_IAR_VERSION)) || \
1664        HEDLEY_HAS_EXTENSION(c_generic_selections) || \
1665        HEDLEY_GCC_VERSION_CHECK(4,9,0) || \
1666        HEDLEY_INTEL_VERSION_CHECK(17,0,0) || \
1667        HEDLEY_IBM_VERSION_CHECK(12,1,0) || \
1668        HEDLEY_ARM_VERSION_CHECK(5,3,0)
1669 #    if defined(__INTPTR_TYPE__)
1670 #      define HEDLEY_IS_CONSTEXPR_(expr) _Generic((1 ? (void*) ((__INTPTR_TYPE__) ((expr) * 0)) : (int*) 0), int*: 1, void*: 0)
1671 #    else
1672 #      include <stdint.h>
1673 #      define HEDLEY_IS_CONSTEXPR_(expr) _Generic((1 ? (void*) ((intptr_t) * 0) : (int*) 0), int*: 1, void*: 0)
1674 #    endif
1675 #  elif \
1676        defined(HEDLEY_GCC_VERSION) || \
1677        defined(HEDLEY_INTEL_VERSION) || \
1678        defined(HEDLEY_TINYC_VERSION) || \
1679        defined(HEDLEY_TI_ARMCL_VERSION) || \
1680        HEDLEY_TI_CL430_VERSION_CHECK(18,12,0) || \
1681        defined(HEDLEY_TI_CL2000_VERSION) || \
1682        defined(HEDLEY_TI_CL6X_VERSION) || \
1683        defined(HEDLEY_TI_CL7X_VERSION) || \
1684        defined(HEDLEY_TI_CLPRU_VERSION) || \
1685        defined(__clang__)
1686 #    define HEDLEY_IS_CONSTEXPR_(expr) ( \
1687          sizeof(void) != \
1688          sizeof(*( \
1689            1 ? \
1690              ((void*) ((expr) * 0L) ) : \
1691              ((struct { char v[sizeof(void) * 2]; } *) 1) \
1692            ) \
1693          ) \
1694        )
1695 #  endif
1696 #endif
1697 #if defined(HEDLEY_IS_CONSTEXPR_)
1698 #  if !defined(HEDLEY_IS_CONSTANT)
1699 #    define HEDLEY_IS_CONSTANT(expr) HEDLEY_IS_CONSTEXPR_(expr)
1700 #  endif
1701 #  define HEDLEY_REQUIRE_CONSTEXPR(expr) (HEDLEY_IS_CONSTEXPR_(expr) ? (expr) : (-1))
1702 #else
1703 #  if !defined(HEDLEY_IS_CONSTANT)
1704 #    define HEDLEY_IS_CONSTANT(expr) (0)
1705 #  endif
1706 #  define HEDLEY_REQUIRE_CONSTEXPR(expr) (expr)
1707 #endif
1708 
1709 #if defined(HEDLEY_BEGIN_C_DECLS)
1710 #  undef HEDLEY_BEGIN_C_DECLS
1711 #endif
1712 #if defined(HEDLEY_END_C_DECLS)
1713 #  undef HEDLEY_END_C_DECLS
1714 #endif
1715 #if defined(HEDLEY_C_DECL)
1716 #  undef HEDLEY_C_DECL
1717 #endif
1718 #if defined(__cplusplus)
1719 #  define HEDLEY_BEGIN_C_DECLS extern "C" {
1720 #  define HEDLEY_END_C_DECLS }
1721 #  define HEDLEY_C_DECL extern "C"
1722 #else
1723 #  define HEDLEY_BEGIN_C_DECLS
1724 #  define HEDLEY_END_C_DECLS
1725 #  define HEDLEY_C_DECL
1726 #endif
1727 
1728 #if defined(HEDLEY_STATIC_ASSERT)
1729 #  undef HEDLEY_STATIC_ASSERT
1730 #endif
1731 #if \
1732   !defined(__cplusplus) && ( \
1733       (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L)) || \
1734       HEDLEY_HAS_FEATURE(c_static_assert) || \
1735       HEDLEY_GCC_VERSION_CHECK(6,0,0) || \
1736       HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \
1737       defined(_Static_assert) \
1738     )
1739 #  define HEDLEY_STATIC_ASSERT(expr, message) _Static_assert(expr, message)
1740 #elif \
1741   (defined(__cplusplus) && (__cplusplus >= 201103L)) || \
1742   HEDLEY_MSVC_VERSION_CHECK(16,0,0)
1743 #  define HEDLEY_STATIC_ASSERT(expr, message) HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_(static_assert(expr, message))
1744 #else
1745 #  define HEDLEY_STATIC_ASSERT(expr, message)
1746 #endif
1747 
1748 #if defined(HEDLEY_NULL)
1749 #  undef HEDLEY_NULL
1750 #endif
1751 #if defined(__cplusplus)
1752 #  if __cplusplus >= 201103L
1753 #    define HEDLEY_NULL HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_(nullptr)
1754 #  elif defined(NULL)
1755 #    define HEDLEY_NULL NULL
1756 #  else
1757 #    define HEDLEY_NULL HEDLEY_STATIC_CAST(void*, 0)
1758 #  endif
1759 #elif defined(NULL)
1760 #  define HEDLEY_NULL NULL
1761 #else
1762 #  define HEDLEY_NULL ((void*) 0)
1763 #endif
1764 
1765 #if defined(HEDLEY_MESSAGE)
1766 #  undef HEDLEY_MESSAGE
1767 #endif
1768 #if HEDLEY_HAS_WARNING("-Wunknown-pragmas")
1769 #  define HEDLEY_MESSAGE(msg) \
1770   HEDLEY_DIAGNOSTIC_PUSH \
1771   HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS \
1772   HEDLEY_PRAGMA(message msg) \
1773   HEDLEY_DIAGNOSTIC_POP
1774 #elif \
1775   HEDLEY_GCC_VERSION_CHECK(4,4,0) || \
1776   HEDLEY_INTEL_VERSION_CHECK(13,0,0)
1777 #  define HEDLEY_MESSAGE(msg) HEDLEY_PRAGMA(message msg)
1778 #elif HEDLEY_CRAY_VERSION_CHECK(5,0,0)
1779 #  define HEDLEY_MESSAGE(msg) HEDLEY_PRAGMA(_CRI message msg)
1780 #elif HEDLEY_IAR_VERSION_CHECK(8,0,0)
1781 #  define HEDLEY_MESSAGE(msg) HEDLEY_PRAGMA(message(msg))
1782 #elif HEDLEY_PELLES_VERSION_CHECK(2,0,0)
1783 #  define HEDLEY_MESSAGE(msg) HEDLEY_PRAGMA(message(msg))
1784 #else
1785 #  define HEDLEY_MESSAGE(msg)
1786 #endif
1787 
1788 #if defined(HEDLEY_WARNING)
1789 #  undef HEDLEY_WARNING
1790 #endif
1791 #if HEDLEY_HAS_WARNING("-Wunknown-pragmas")
1792 #  define HEDLEY_WARNING(msg) \
1793   HEDLEY_DIAGNOSTIC_PUSH \
1794   HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS \
1795   HEDLEY_PRAGMA(clang warning msg) \
1796   HEDLEY_DIAGNOSTIC_POP
1797 #elif \
1798   HEDLEY_GCC_VERSION_CHECK(4,8,0) || \
1799   HEDLEY_PGI_VERSION_CHECK(18,4,0) || \
1800   HEDLEY_INTEL_VERSION_CHECK(13,0,0)
1801 #  define HEDLEY_WARNING(msg) HEDLEY_PRAGMA(GCC warning msg)
1802 #elif HEDLEY_MSVC_VERSION_CHECK(15,0,0)
1803 #  define HEDLEY_WARNING(msg) HEDLEY_PRAGMA(message(msg))
1804 #else
1805 #  define HEDLEY_WARNING(msg) HEDLEY_MESSAGE(msg)
1806 #endif
1807 
1808 #if defined(HEDLEY_REQUIRE)
1809 #  undef HEDLEY_REQUIRE
1810 #endif
1811 #if defined(HEDLEY_REQUIRE_MSG)
1812 #  undef HEDLEY_REQUIRE_MSG
1813 #endif
1814 #if HEDLEY_HAS_ATTRIBUTE(diagnose_if)
1815 #  if HEDLEY_HAS_WARNING("-Wgcc-compat")
1816 #    define HEDLEY_REQUIRE(expr) \
1817        HEDLEY_DIAGNOSTIC_PUSH \
1818        _Pragma("clang diagnostic ignored \"-Wgcc-compat\"") \
1819        __attribute__((diagnose_if(!(expr), #expr, "error"))) \
1820        HEDLEY_DIAGNOSTIC_POP
1821 #    define HEDLEY_REQUIRE_MSG(expr,msg) \
1822        HEDLEY_DIAGNOSTIC_PUSH \
1823        _Pragma("clang diagnostic ignored \"-Wgcc-compat\"") \
1824        __attribute__((diagnose_if(!(expr), msg, "error"))) \
1825        HEDLEY_DIAGNOSTIC_POP
1826 #  else
1827 #    define HEDLEY_REQUIRE(expr) __attribute__((diagnose_if(!(expr), #expr, "error")))
1828 #    define HEDLEY_REQUIRE_MSG(expr,msg) __attribute__((diagnose_if(!(expr), msg, "error")))
1829 #  endif
1830 #else
1831 #  define HEDLEY_REQUIRE(expr)
1832 #  define HEDLEY_REQUIRE_MSG(expr,msg)
1833 #endif
1834 
1835 #if defined(HEDLEY_FLAGS)
1836 #  undef HEDLEY_FLAGS
1837 #endif
1838 #if HEDLEY_HAS_ATTRIBUTE(flag_enum)
1839 #  define HEDLEY_FLAGS __attribute__((__flag_enum__))
1840 #else
1841 #  define HEDLEY_FLAGS
1842 #endif
1843 
1844 #if defined(HEDLEY_FLAGS_CAST)
1845 #  undef HEDLEY_FLAGS_CAST
1846 #endif
1847 #if HEDLEY_INTEL_VERSION_CHECK(19,0,0)
1848 #  define HEDLEY_FLAGS_CAST(T, expr) (__extension__ ({ \
1849   HEDLEY_DIAGNOSTIC_PUSH \
1850       _Pragma("warning(disable:188)") \
1851       ((T) (expr)); \
1852       HEDLEY_DIAGNOSTIC_POP \
1853     }))
1854 #else
1855 #  define HEDLEY_FLAGS_CAST(T, expr) HEDLEY_STATIC_CAST(T, expr)
1856 #endif
1857 
1858 #if defined(HEDLEY_EMPTY_BASES)
1859 #  undef HEDLEY_EMPTY_BASES
1860 #endif
1861 #if HEDLEY_MSVC_VERSION_CHECK(19,0,23918) && !HEDLEY_MSVC_VERSION_CHECK(20,0,0)
1862 #  define HEDLEY_EMPTY_BASES __declspec(empty_bases)
1863 #else
1864 #  define HEDLEY_EMPTY_BASES
1865 #endif
1866 
1867 /* Remaining macros are deprecated. */
1868 
1869 #if defined(HEDLEY_GCC_NOT_CLANG_VERSION_CHECK)
1870 #  undef HEDLEY_GCC_NOT_CLANG_VERSION_CHECK
1871 #endif
1872 #if defined(__clang__)
1873 #  define HEDLEY_GCC_NOT_CLANG_VERSION_CHECK(major,minor,patch) (0)
1874 #else
1875 #  define HEDLEY_GCC_NOT_CLANG_VERSION_CHECK(major,minor,patch) HEDLEY_GCC_VERSION_CHECK(major,minor,patch)
1876 #endif
1877 
1878 #if defined(HEDLEY_CLANG_HAS_ATTRIBUTE)
1879 #  undef HEDLEY_CLANG_HAS_ATTRIBUTE
1880 #endif
1881 #define HEDLEY_CLANG_HAS_ATTRIBUTE(attribute) HEDLEY_HAS_ATTRIBUTE(attribute)
1882 
1883 #if defined(HEDLEY_CLANG_HAS_CPP_ATTRIBUTE)
1884 #  undef HEDLEY_CLANG_HAS_CPP_ATTRIBUTE
1885 #endif
1886 #define HEDLEY_CLANG_HAS_CPP_ATTRIBUTE(attribute) HEDLEY_HAS_CPP_ATTRIBUTE(attribute)
1887 
1888 #if defined(HEDLEY_CLANG_HAS_BUILTIN)
1889 #  undef HEDLEY_CLANG_HAS_BUILTIN
1890 #endif
1891 #define HEDLEY_CLANG_HAS_BUILTIN(builtin) HEDLEY_HAS_BUILTIN(builtin)
1892 
1893 #if defined(HEDLEY_CLANG_HAS_FEATURE)
1894 #  undef HEDLEY_CLANG_HAS_FEATURE
1895 #endif
1896 #define HEDLEY_CLANG_HAS_FEATURE(feature) HEDLEY_HAS_FEATURE(feature)
1897 
1898 #if defined(HEDLEY_CLANG_HAS_EXTENSION)
1899 #  undef HEDLEY_CLANG_HAS_EXTENSION
1900 #endif
1901 #define HEDLEY_CLANG_HAS_EXTENSION(extension) HEDLEY_HAS_EXTENSION(extension)
1902 
1903 #if defined(HEDLEY_CLANG_HAS_DECLSPEC_DECLSPEC_ATTRIBUTE)
1904 #  undef HEDLEY_CLANG_HAS_DECLSPEC_DECLSPEC_ATTRIBUTE
1905 #endif
1906 #define HEDLEY_CLANG_HAS_DECLSPEC_ATTRIBUTE(attribute) HEDLEY_HAS_DECLSPEC_ATTRIBUTE(attribute)
1907 
1908 #if defined(HEDLEY_CLANG_HAS_WARNING)
1909 #  undef HEDLEY_CLANG_HAS_WARNING
1910 #endif
1911 #define HEDLEY_CLANG_HAS_WARNING(warning) HEDLEY_HAS_WARNING(warning)
1912 
1913 #endif /* !defined(HEDLEY_VERSION) || (HEDLEY_VERSION < X) */
1914