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