mqt-core 3.3.2__cp314-cp314t-macosx_11_0_x86_64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (546) hide show
  1. mqt/core/__init__.py +77 -0
  2. mqt/core/__main__.py +55 -0
  3. mqt/core/_commands.py +52 -0
  4. mqt/core/_compat/__init__.py +11 -0
  5. mqt/core/_compat/typing.py +29 -0
  6. mqt/core/_version.py +34 -0
  7. mqt/core/_version.pyi +12 -0
  8. mqt/core/dd.cpython-314t-darwin.so +0 -0
  9. mqt/core/dd.pyi +1016 -0
  10. mqt/core/dd_evaluation.py +368 -0
  11. mqt/core/fomac.cpython-314t-darwin.so +0 -0
  12. mqt/core/fomac.pyi +125 -0
  13. mqt/core/include/mqt-core/algorithms/BernsteinVazirani.hpp +39 -0
  14. mqt/core/include/mqt-core/algorithms/GHZState.hpp +18 -0
  15. mqt/core/include/mqt-core/algorithms/Grover.hpp +33 -0
  16. mqt/core/include/mqt-core/algorithms/QFT.hpp +21 -0
  17. mqt/core/include/mqt-core/algorithms/QPE.hpp +30 -0
  18. mqt/core/include/mqt-core/algorithms/RandomCliffordCircuit.hpp +22 -0
  19. mqt/core/include/mqt-core/algorithms/StatePreparation.hpp +43 -0
  20. mqt/core/include/mqt-core/algorithms/WState.hpp +18 -0
  21. mqt/core/include/mqt-core/algorithms/mqt_core_algorithms_export.h +43 -0
  22. mqt/core/include/mqt-core/boost/config/abi/borland_prefix.hpp +27 -0
  23. mqt/core/include/mqt-core/boost/config/abi/borland_suffix.hpp +12 -0
  24. mqt/core/include/mqt-core/boost/config/abi/msvc_prefix.hpp +22 -0
  25. mqt/core/include/mqt-core/boost/config/abi/msvc_suffix.hpp +8 -0
  26. mqt/core/include/mqt-core/boost/config/abi_prefix.hpp +25 -0
  27. mqt/core/include/mqt-core/boost/config/abi_suffix.hpp +25 -0
  28. mqt/core/include/mqt-core/boost/config/assert_cxx03.hpp +211 -0
  29. mqt/core/include/mqt-core/boost/config/assert_cxx11.hpp +212 -0
  30. mqt/core/include/mqt-core/boost/config/assert_cxx14.hpp +47 -0
  31. mqt/core/include/mqt-core/boost/config/assert_cxx17.hpp +65 -0
  32. mqt/core/include/mqt-core/boost/config/assert_cxx20.hpp +59 -0
  33. mqt/core/include/mqt-core/boost/config/assert_cxx23.hpp +41 -0
  34. mqt/core/include/mqt-core/boost/config/assert_cxx98.hpp +23 -0
  35. mqt/core/include/mqt-core/boost/config/auto_link.hpp +525 -0
  36. mqt/core/include/mqt-core/boost/config/compiler/borland.hpp +342 -0
  37. mqt/core/include/mqt-core/boost/config/compiler/clang.hpp +370 -0
  38. mqt/core/include/mqt-core/boost/config/compiler/clang_version.hpp +89 -0
  39. mqt/core/include/mqt-core/boost/config/compiler/codegear.hpp +389 -0
  40. mqt/core/include/mqt-core/boost/config/compiler/comeau.hpp +59 -0
  41. mqt/core/include/mqt-core/boost/config/compiler/common_edg.hpp +185 -0
  42. mqt/core/include/mqt-core/boost/config/compiler/compaq_cxx.hpp +19 -0
  43. mqt/core/include/mqt-core/boost/config/compiler/cray.hpp +446 -0
  44. mqt/core/include/mqt-core/boost/config/compiler/diab.hpp +26 -0
  45. mqt/core/include/mqt-core/boost/config/compiler/digitalmars.hpp +146 -0
  46. mqt/core/include/mqt-core/boost/config/compiler/gcc.hpp +386 -0
  47. mqt/core/include/mqt-core/boost/config/compiler/gcc_xml.hpp +115 -0
  48. mqt/core/include/mqt-core/boost/config/compiler/greenhills.hpp +28 -0
  49. mqt/core/include/mqt-core/boost/config/compiler/hp_acc.hpp +153 -0
  50. mqt/core/include/mqt-core/boost/config/compiler/intel.hpp +577 -0
  51. mqt/core/include/mqt-core/boost/config/compiler/kai.hpp +33 -0
  52. mqt/core/include/mqt-core/boost/config/compiler/metrowerks.hpp +201 -0
  53. mqt/core/include/mqt-core/boost/config/compiler/mpw.hpp +143 -0
  54. mqt/core/include/mqt-core/boost/config/compiler/nvcc.hpp +64 -0
  55. mqt/core/include/mqt-core/boost/config/compiler/pathscale.hpp +141 -0
  56. mqt/core/include/mqt-core/boost/config/compiler/pgi.hpp +23 -0
  57. mqt/core/include/mqt-core/boost/config/compiler/sgi_mipspro.hpp +29 -0
  58. mqt/core/include/mqt-core/boost/config/compiler/sunpro_cc.hpp +225 -0
  59. mqt/core/include/mqt-core/boost/config/compiler/vacpp.hpp +189 -0
  60. mqt/core/include/mqt-core/boost/config/compiler/visualc.hpp +398 -0
  61. mqt/core/include/mqt-core/boost/config/compiler/xlcpp.hpp +303 -0
  62. mqt/core/include/mqt-core/boost/config/compiler/xlcpp_zos.hpp +174 -0
  63. mqt/core/include/mqt-core/boost/config/detail/cxx_composite.hpp +218 -0
  64. mqt/core/include/mqt-core/boost/config/detail/posix_features.hpp +95 -0
  65. mqt/core/include/mqt-core/boost/config/detail/select_compiler_config.hpp +157 -0
  66. mqt/core/include/mqt-core/boost/config/detail/select_platform_config.hpp +147 -0
  67. mqt/core/include/mqt-core/boost/config/detail/select_stdlib_config.hpp +121 -0
  68. mqt/core/include/mqt-core/boost/config/detail/suffix.hpp +1334 -0
  69. mqt/core/include/mqt-core/boost/config/header_deprecated.hpp +26 -0
  70. mqt/core/include/mqt-core/boost/config/helper_macros.hpp +37 -0
  71. mqt/core/include/mqt-core/boost/config/no_tr1/cmath.hpp +28 -0
  72. mqt/core/include/mqt-core/boost/config/no_tr1/complex.hpp +28 -0
  73. mqt/core/include/mqt-core/boost/config/no_tr1/functional.hpp +28 -0
  74. mqt/core/include/mqt-core/boost/config/no_tr1/memory.hpp +28 -0
  75. mqt/core/include/mqt-core/boost/config/no_tr1/utility.hpp +28 -0
  76. mqt/core/include/mqt-core/boost/config/platform/aix.hpp +33 -0
  77. mqt/core/include/mqt-core/boost/config/platform/amigaos.hpp +15 -0
  78. mqt/core/include/mqt-core/boost/config/platform/beos.hpp +26 -0
  79. mqt/core/include/mqt-core/boost/config/platform/bsd.hpp +83 -0
  80. mqt/core/include/mqt-core/boost/config/platform/cloudabi.hpp +18 -0
  81. mqt/core/include/mqt-core/boost/config/platform/cray.hpp +18 -0
  82. mqt/core/include/mqt-core/boost/config/platform/cygwin.hpp +71 -0
  83. mqt/core/include/mqt-core/boost/config/platform/haiku.hpp +31 -0
  84. mqt/core/include/mqt-core/boost/config/platform/hpux.hpp +87 -0
  85. mqt/core/include/mqt-core/boost/config/platform/irix.hpp +31 -0
  86. mqt/core/include/mqt-core/boost/config/platform/linux.hpp +106 -0
  87. mqt/core/include/mqt-core/boost/config/platform/macos.hpp +87 -0
  88. mqt/core/include/mqt-core/boost/config/platform/qnxnto.hpp +31 -0
  89. mqt/core/include/mqt-core/boost/config/platform/solaris.hpp +31 -0
  90. mqt/core/include/mqt-core/boost/config/platform/symbian.hpp +97 -0
  91. mqt/core/include/mqt-core/boost/config/platform/vms.hpp +25 -0
  92. mqt/core/include/mqt-core/boost/config/platform/vxworks.hpp +422 -0
  93. mqt/core/include/mqt-core/boost/config/platform/wasm.hpp +23 -0
  94. mqt/core/include/mqt-core/boost/config/platform/win32.hpp +90 -0
  95. mqt/core/include/mqt-core/boost/config/platform/zos.hpp +32 -0
  96. mqt/core/include/mqt-core/boost/config/pragma_message.hpp +31 -0
  97. mqt/core/include/mqt-core/boost/config/requires_threads.hpp +92 -0
  98. mqt/core/include/mqt-core/boost/config/stdlib/dinkumware.hpp +324 -0
  99. mqt/core/include/mqt-core/boost/config/stdlib/libcomo.hpp +93 -0
  100. mqt/core/include/mqt-core/boost/config/stdlib/libcpp.hpp +180 -0
  101. mqt/core/include/mqt-core/boost/config/stdlib/libstdcpp3.hpp +482 -0
  102. mqt/core/include/mqt-core/boost/config/stdlib/modena.hpp +79 -0
  103. mqt/core/include/mqt-core/boost/config/stdlib/msl.hpp +98 -0
  104. mqt/core/include/mqt-core/boost/config/stdlib/roguewave.hpp +208 -0
  105. mqt/core/include/mqt-core/boost/config/stdlib/sgi.hpp +168 -0
  106. mqt/core/include/mqt-core/boost/config/stdlib/stlport.hpp +258 -0
  107. mqt/core/include/mqt-core/boost/config/stdlib/vacpp.hpp +74 -0
  108. mqt/core/include/mqt-core/boost/config/stdlib/xlcpp_zos.hpp +61 -0
  109. mqt/core/include/mqt-core/boost/config/user.hpp +133 -0
  110. mqt/core/include/mqt-core/boost/config/warning_disable.hpp +47 -0
  111. mqt/core/include/mqt-core/boost/config/workaround.hpp +305 -0
  112. mqt/core/include/mqt-core/boost/config.hpp +67 -0
  113. mqt/core/include/mqt-core/boost/cstdint.hpp +556 -0
  114. mqt/core/include/mqt-core/boost/cxx11_char_types.hpp +70 -0
  115. mqt/core/include/mqt-core/boost/detail/workaround.hpp +10 -0
  116. mqt/core/include/mqt-core/boost/limits.hpp +146 -0
  117. mqt/core/include/mqt-core/boost/multiprecision/complex128.hpp +24 -0
  118. mqt/core/include/mqt-core/boost/multiprecision/complex_adaptor.hpp +1046 -0
  119. mqt/core/include/mqt-core/boost/multiprecision/concepts/mp_number_archetypes.hpp +257 -0
  120. mqt/core/include/mqt-core/boost/multiprecision/cpp_bin_float/io.hpp +698 -0
  121. mqt/core/include/mqt-core/boost/multiprecision/cpp_bin_float/transcendental.hpp +157 -0
  122. mqt/core/include/mqt-core/boost/multiprecision/cpp_bin_float.hpp +2297 -0
  123. mqt/core/include/mqt-core/boost/multiprecision/cpp_complex.hpp +12 -0
  124. mqt/core/include/mqt-core/boost/multiprecision/cpp_dec_float.hpp +3690 -0
  125. mqt/core/include/mqt-core/boost/multiprecision/cpp_int/add.hpp +368 -0
  126. mqt/core/include/mqt-core/boost/multiprecision/cpp_int/add_unsigned.hpp +387 -0
  127. mqt/core/include/mqt-core/boost/multiprecision/cpp_int/bitwise.hpp +889 -0
  128. mqt/core/include/mqt-core/boost/multiprecision/cpp_int/checked.hpp +178 -0
  129. mqt/core/include/mqt-core/boost/multiprecision/cpp_int/comparison.hpp +374 -0
  130. mqt/core/include/mqt-core/boost/multiprecision/cpp_int/cpp_int_config.hpp +161 -0
  131. mqt/core/include/mqt-core/boost/multiprecision/cpp_int/divide.hpp +703 -0
  132. mqt/core/include/mqt-core/boost/multiprecision/cpp_int/import_export.hpp +248 -0
  133. mqt/core/include/mqt-core/boost/multiprecision/cpp_int/intel_intrinsics.hpp +138 -0
  134. mqt/core/include/mqt-core/boost/multiprecision/cpp_int/limits.hpp +282 -0
  135. mqt/core/include/mqt-core/boost/multiprecision/cpp_int/literals.hpp +295 -0
  136. mqt/core/include/mqt-core/boost/multiprecision/cpp_int/misc.hpp +1457 -0
  137. mqt/core/include/mqt-core/boost/multiprecision/cpp_int/multiply.hpp +848 -0
  138. mqt/core/include/mqt-core/boost/multiprecision/cpp_int/serialize.hpp +211 -0
  139. mqt/core/include/mqt-core/boost/multiprecision/cpp_int/value_pack.hpp +42 -0
  140. mqt/core/include/mqt-core/boost/multiprecision/cpp_int.hpp +2360 -0
  141. mqt/core/include/mqt-core/boost/multiprecision/debug_adaptor.hpp +760 -0
  142. mqt/core/include/mqt-core/boost/multiprecision/detail/assert.hpp +29 -0
  143. mqt/core/include/mqt-core/boost/multiprecision/detail/atomic.hpp +62 -0
  144. mqt/core/include/mqt-core/boost/multiprecision/detail/bitscan.hpp +317 -0
  145. mqt/core/include/mqt-core/boost/multiprecision/detail/check_cpp11_config.hpp +64 -0
  146. mqt/core/include/mqt-core/boost/multiprecision/detail/constexpr.hpp +88 -0
  147. mqt/core/include/mqt-core/boost/multiprecision/detail/default_ops.hpp +4052 -0
  148. mqt/core/include/mqt-core/boost/multiprecision/detail/digits.hpp +49 -0
  149. mqt/core/include/mqt-core/boost/multiprecision/detail/dynamic_array.hpp +44 -0
  150. mqt/core/include/mqt-core/boost/multiprecision/detail/empty_value.hpp +87 -0
  151. mqt/core/include/mqt-core/boost/multiprecision/detail/endian.hpp +35 -0
  152. mqt/core/include/mqt-core/boost/multiprecision/detail/et_ops.hpp +1831 -0
  153. mqt/core/include/mqt-core/boost/multiprecision/detail/float128_functions.hpp +95 -0
  154. mqt/core/include/mqt-core/boost/multiprecision/detail/float_string_cvt.hpp +333 -0
  155. mqt/core/include/mqt-core/boost/multiprecision/detail/fpclassify.hpp +101 -0
  156. mqt/core/include/mqt-core/boost/multiprecision/detail/functions/constants.hpp +288 -0
  157. mqt/core/include/mqt-core/boost/multiprecision/detail/functions/pow.hpp +905 -0
  158. mqt/core/include/mqt-core/boost/multiprecision/detail/functions/trig.hpp +1058 -0
  159. mqt/core/include/mqt-core/boost/multiprecision/detail/functions/trunc.hpp +82 -0
  160. mqt/core/include/mqt-core/boost/multiprecision/detail/generic_interconvert.hpp +687 -0
  161. mqt/core/include/mqt-core/boost/multiprecision/detail/hash.hpp +56 -0
  162. mqt/core/include/mqt-core/boost/multiprecision/detail/integer_ops.hpp +474 -0
  163. mqt/core/include/mqt-core/boost/multiprecision/detail/itos.hpp +39 -0
  164. mqt/core/include/mqt-core/boost/multiprecision/detail/min_max.hpp +106 -0
  165. mqt/core/include/mqt-core/boost/multiprecision/detail/no_et_ops.hpp +661 -0
  166. mqt/core/include/mqt-core/boost/multiprecision/detail/no_exceptions_support.hpp +55 -0
  167. mqt/core/include/mqt-core/boost/multiprecision/detail/number_base.hpp +1656 -0
  168. mqt/core/include/mqt-core/boost/multiprecision/detail/number_compare.hpp +848 -0
  169. mqt/core/include/mqt-core/boost/multiprecision/detail/precision.hpp +313 -0
  170. mqt/core/include/mqt-core/boost/multiprecision/detail/rebind.hpp +19 -0
  171. mqt/core/include/mqt-core/boost/multiprecision/detail/standalone_config.hpp +148 -0
  172. mqt/core/include/mqt-core/boost/multiprecision/detail/static_array.hpp +42 -0
  173. mqt/core/include/mqt-core/boost/multiprecision/detail/string_helpers.hpp +48 -0
  174. mqt/core/include/mqt-core/boost/multiprecision/detail/tables.hpp +80 -0
  175. mqt/core/include/mqt-core/boost/multiprecision/detail/ublas_interop.hpp +75 -0
  176. mqt/core/include/mqt-core/boost/multiprecision/detail/uniform_int_distribution.hpp +212 -0
  177. mqt/core/include/mqt-core/boost/multiprecision/detail/utype_helper.hpp +374 -0
  178. mqt/core/include/mqt-core/boost/multiprecision/eigen.hpp +248 -0
  179. mqt/core/include/mqt-core/boost/multiprecision/float128.hpp +920 -0
  180. mqt/core/include/mqt-core/boost/multiprecision/fwd.hpp +268 -0
  181. mqt/core/include/mqt-core/boost/multiprecision/gmp.hpp +4060 -0
  182. mqt/core/include/mqt-core/boost/multiprecision/integer.hpp +363 -0
  183. mqt/core/include/mqt-core/boost/multiprecision/logged_adaptor.hpp +834 -0
  184. mqt/core/include/mqt-core/boost/multiprecision/miller_rabin.hpp +221 -0
  185. mqt/core/include/mqt-core/boost/multiprecision/mpc.hpp +1721 -0
  186. mqt/core/include/mqt-core/boost/multiprecision/mpfi.hpp +2559 -0
  187. mqt/core/include/mqt-core/boost/multiprecision/mpfr.hpp +3644 -0
  188. mqt/core/include/mqt-core/boost/multiprecision/number.hpp +2500 -0
  189. mqt/core/include/mqt-core/boost/multiprecision/random.hpp +23 -0
  190. mqt/core/include/mqt-core/boost/multiprecision/rational_adaptor.hpp +1289 -0
  191. mqt/core/include/mqt-core/boost/multiprecision/tommath.hpp +1034 -0
  192. mqt/core/include/mqt-core/boost/multiprecision/traits/explicit_conversion.hpp +67 -0
  193. mqt/core/include/mqt-core/boost/multiprecision/traits/extract_exponent_type.hpp +28 -0
  194. mqt/core/include/mqt-core/boost/multiprecision/traits/is_backend.hpp +91 -0
  195. mqt/core/include/mqt-core/boost/multiprecision/traits/is_byte_container.hpp +51 -0
  196. mqt/core/include/mqt-core/boost/multiprecision/traits/is_complex.hpp +22 -0
  197. mqt/core/include/mqt-core/boost/multiprecision/traits/is_convertible_arithmetic.hpp +51 -0
  198. mqt/core/include/mqt-core/boost/multiprecision/traits/is_restricted_conversion.hpp +47 -0
  199. mqt/core/include/mqt-core/boost/multiprecision/traits/is_variable_precision.hpp +25 -0
  200. mqt/core/include/mqt-core/boost/multiprecision/traits/max_digits10.hpp +79 -0
  201. mqt/core/include/mqt-core/boost/multiprecision/traits/std_integer_traits.hpp +90 -0
  202. mqt/core/include/mqt-core/boost/multiprecision/traits/transcendental_reduction_type.hpp +21 -0
  203. mqt/core/include/mqt-core/boost/version.hpp +32 -0
  204. mqt/core/include/mqt-core/circuit_optimizer/CircuitOptimizer.hpp +119 -0
  205. mqt/core/include/mqt-core/circuit_optimizer/mqt_core_circuit_optimizer_export.h +43 -0
  206. mqt/core/include/mqt-core/datastructures/DirectedAcyclicGraph.hpp +117 -0
  207. mqt/core/include/mqt-core/datastructures/DirectedGraph.hpp +158 -0
  208. mqt/core/include/mqt-core/datastructures/DisjointSet.hpp +50 -0
  209. mqt/core/include/mqt-core/datastructures/Layer.hpp +172 -0
  210. mqt/core/include/mqt-core/datastructures/SymmetricMatrix.hpp +57 -0
  211. mqt/core/include/mqt-core/datastructures/UndirectedGraph.hpp +227 -0
  212. mqt/core/include/mqt-core/datastructures/mqt_core_ds_export.h +43 -0
  213. mqt/core/include/mqt-core/dd/Approximation.hpp +45 -0
  214. mqt/core/include/mqt-core/dd/CachedEdge.hpp +174 -0
  215. mqt/core/include/mqt-core/dd/Complex.hpp +165 -0
  216. mqt/core/include/mqt-core/dd/ComplexNumbers.hpp +150 -0
  217. mqt/core/include/mqt-core/dd/ComplexValue.hpp +184 -0
  218. mqt/core/include/mqt-core/dd/ComputeTable.hpp +183 -0
  219. mqt/core/include/mqt-core/dd/DDDefinitions.hpp +139 -0
  220. mqt/core/include/mqt-core/dd/DDpackageConfig.hpp +104 -0
  221. mqt/core/include/mqt-core/dd/DensityNoiseTable.hpp +114 -0
  222. mqt/core/include/mqt-core/dd/Edge.hpp +416 -0
  223. mqt/core/include/mqt-core/dd/Export.hpp +438 -0
  224. mqt/core/include/mqt-core/dd/FunctionalityConstruction.hpp +75 -0
  225. mqt/core/include/mqt-core/dd/GateMatrixDefinitions.hpp +43 -0
  226. mqt/core/include/mqt-core/dd/LinkedListBase.hpp +45 -0
  227. mqt/core/include/mqt-core/dd/MemoryManager.hpp +193 -0
  228. mqt/core/include/mqt-core/dd/Node.hpp +223 -0
  229. mqt/core/include/mqt-core/dd/NoiseFunctionality.hpp +144 -0
  230. mqt/core/include/mqt-core/dd/Operations.hpp +306 -0
  231. mqt/core/include/mqt-core/dd/Package.hpp +2036 -0
  232. mqt/core/include/mqt-core/dd/Package_fwd.hpp +22 -0
  233. mqt/core/include/mqt-core/dd/RealNumber.hpp +255 -0
  234. mqt/core/include/mqt-core/dd/RealNumberUniqueTable.hpp +217 -0
  235. mqt/core/include/mqt-core/dd/Simulation.hpp +98 -0
  236. mqt/core/include/mqt-core/dd/StateGeneration.hpp +143 -0
  237. mqt/core/include/mqt-core/dd/StochasticNoiseOperationTable.hpp +88 -0
  238. mqt/core/include/mqt-core/dd/UnaryComputeTable.hpp +121 -0
  239. mqt/core/include/mqt-core/dd/UniqueTable.hpp +243 -0
  240. mqt/core/include/mqt-core/dd/mqt_core_dd_export.h +43 -0
  241. mqt/core/include/mqt-core/dd/statistics/MemoryManagerStatistics.hpp +84 -0
  242. mqt/core/include/mqt-core/dd/statistics/PackageStatistics.hpp +55 -0
  243. mqt/core/include/mqt-core/dd/statistics/Statistics.hpp +48 -0
  244. mqt/core/include/mqt-core/dd/statistics/TableStatistics.hpp +79 -0
  245. mqt/core/include/mqt-core/dd/statistics/UniqueTableStatistics.hpp +31 -0
  246. mqt/core/include/mqt-core/fomac/FoMaC.hpp +568 -0
  247. mqt/core/include/mqt-core/ir/Definitions.hpp +108 -0
  248. mqt/core/include/mqt-core/ir/Permutation.hpp +213 -0
  249. mqt/core/include/mqt-core/ir/QuantumComputation.hpp +596 -0
  250. mqt/core/include/mqt-core/ir/Register.hpp +125 -0
  251. mqt/core/include/mqt-core/ir/mqt_core_ir_export.h +43 -0
  252. mqt/core/include/mqt-core/ir/operations/AodOperation.hpp +92 -0
  253. mqt/core/include/mqt-core/ir/operations/CompoundOperation.hpp +212 -0
  254. mqt/core/include/mqt-core/ir/operations/Control.hpp +142 -0
  255. mqt/core/include/mqt-core/ir/operations/Expression.hpp +847 -0
  256. mqt/core/include/mqt-core/ir/operations/IfElseOperation.hpp +169 -0
  257. mqt/core/include/mqt-core/ir/operations/NonUnitaryOperation.hpp +118 -0
  258. mqt/core/include/mqt-core/ir/operations/OpType.hpp +120 -0
  259. mqt/core/include/mqt-core/ir/operations/OpType.inc +76 -0
  260. mqt/core/include/mqt-core/ir/operations/Operation.hpp +247 -0
  261. mqt/core/include/mqt-core/ir/operations/StandardOperation.hpp +140 -0
  262. mqt/core/include/mqt-core/ir/operations/SymbolicOperation.hpp +144 -0
  263. mqt/core/include/mqt-core/mqt_na_qdmi/device.h +602 -0
  264. mqt/core/include/mqt-core/mqt_na_qdmi/types.h +78 -0
  265. mqt/core/include/mqt-core/na/NAComputation.hpp +185 -0
  266. mqt/core/include/mqt-core/na/device/Device.hpp +410 -0
  267. mqt/core/include/mqt-core/na/device/DeviceMemberInitializers.hpp +724 -0
  268. mqt/core/include/mqt-core/na/device/Generator.hpp +447 -0
  269. mqt/core/include/mqt-core/na/entities/Atom.hpp +62 -0
  270. mqt/core/include/mqt-core/na/entities/Location.hpp +154 -0
  271. mqt/core/include/mqt-core/na/entities/Zone.hpp +95 -0
  272. mqt/core/include/mqt-core/na/fomac/Device.hpp +169 -0
  273. mqt/core/include/mqt-core/na/mqt_core_na_export.h +43 -0
  274. mqt/core/include/mqt-core/na/operations/GlobalCZOp.hpp +38 -0
  275. mqt/core/include/mqt-core/na/operations/GlobalOp.hpp +58 -0
  276. mqt/core/include/mqt-core/na/operations/GlobalRYOp.hpp +42 -0
  277. mqt/core/include/mqt-core/na/operations/LoadOp.hpp +89 -0
  278. mqt/core/include/mqt-core/na/operations/LocalOp.hpp +56 -0
  279. mqt/core/include/mqt-core/na/operations/LocalRZOp.hpp +42 -0
  280. mqt/core/include/mqt-core/na/operations/LocalUOp.hpp +49 -0
  281. mqt/core/include/mqt-core/na/operations/MoveOp.hpp +66 -0
  282. mqt/core/include/mqt-core/na/operations/Op.hpp +62 -0
  283. mqt/core/include/mqt-core/na/operations/ShuttlingOp.hpp +51 -0
  284. mqt/core/include/mqt-core/na/operations/StoreOp.hpp +87 -0
  285. mqt/core/include/mqt-core/qasm3/Exception.hpp +85 -0
  286. mqt/core/include/mqt-core/qasm3/Gate.hpp +65 -0
  287. mqt/core/include/mqt-core/qasm3/Importer.hpp +192 -0
  288. mqt/core/include/mqt-core/qasm3/InstVisitor.hpp +145 -0
  289. mqt/core/include/mqt-core/qasm3/NestedEnvironment.hpp +41 -0
  290. mqt/core/include/mqt-core/qasm3/Parser.hpp +170 -0
  291. mqt/core/include/mqt-core/qasm3/Scanner.hpp +73 -0
  292. mqt/core/include/mqt-core/qasm3/Statement.hpp +486 -0
  293. mqt/core/include/mqt-core/qasm3/Statement_fwd.hpp +39 -0
  294. mqt/core/include/mqt-core/qasm3/StdGates.hpp +232 -0
  295. mqt/core/include/mqt-core/qasm3/Token.hpp +198 -0
  296. mqt/core/include/mqt-core/qasm3/Types.hpp +238 -0
  297. mqt/core/include/mqt-core/qasm3/Types_fwd.hpp +22 -0
  298. mqt/core/include/mqt-core/qasm3/mqt_core_qasm_export.h +43 -0
  299. mqt/core/include/mqt-core/qasm3/passes/CompilerPass.hpp +22 -0
  300. mqt/core/include/mqt-core/qasm3/passes/ConstEvalPass.hpp +102 -0
  301. mqt/core/include/mqt-core/qasm3/passes/TypeCheckPass.hpp +124 -0
  302. mqt/core/include/mqt-core/qdmi/Driver.hpp +431 -0
  303. mqt/core/include/mqt-core/zx/FunctionalityConstruction.hpp +125 -0
  304. mqt/core/include/mqt-core/zx/Rational.hpp +318 -0
  305. mqt/core/include/mqt-core/zx/Rules.hpp +132 -0
  306. mqt/core/include/mqt-core/zx/Simplify.hpp +182 -0
  307. mqt/core/include/mqt-core/zx/Utils.hpp +212 -0
  308. mqt/core/include/mqt-core/zx/ZXDefinitions.hpp +93 -0
  309. mqt/core/include/mqt-core/zx/ZXDiagram.hpp +480 -0
  310. mqt/core/include/mqt-core/zx/mqt_core_zx_export.h +43 -0
  311. mqt/core/include/nlohmann/adl_serializer.hpp +55 -0
  312. mqt/core/include/nlohmann/byte_container_with_subtype.hpp +103 -0
  313. mqt/core/include/nlohmann/detail/abi_macros.hpp +111 -0
  314. mqt/core/include/nlohmann/detail/conversions/from_json.hpp +577 -0
  315. mqt/core/include/nlohmann/detail/conversions/to_chars.hpp +1118 -0
  316. mqt/core/include/nlohmann/detail/conversions/to_json.hpp +479 -0
  317. mqt/core/include/nlohmann/detail/exceptions.hpp +291 -0
  318. mqt/core/include/nlohmann/detail/hash.hpp +129 -0
  319. mqt/core/include/nlohmann/detail/input/binary_reader.hpp +3068 -0
  320. mqt/core/include/nlohmann/detail/input/input_adapters.hpp +549 -0
  321. mqt/core/include/nlohmann/detail/input/json_sax.hpp +986 -0
  322. mqt/core/include/nlohmann/detail/input/lexer.hpp +1643 -0
  323. mqt/core/include/nlohmann/detail/input/parser.hpp +519 -0
  324. mqt/core/include/nlohmann/detail/input/position_t.hpp +37 -0
  325. mqt/core/include/nlohmann/detail/iterators/internal_iterator.hpp +35 -0
  326. mqt/core/include/nlohmann/detail/iterators/iter_impl.hpp +760 -0
  327. mqt/core/include/nlohmann/detail/iterators/iteration_proxy.hpp +235 -0
  328. mqt/core/include/nlohmann/detail/iterators/iterator_traits.hpp +61 -0
  329. mqt/core/include/nlohmann/detail/iterators/json_reverse_iterator.hpp +130 -0
  330. mqt/core/include/nlohmann/detail/iterators/primitive_iterator.hpp +132 -0
  331. mqt/core/include/nlohmann/detail/json_custom_base_class.hpp +39 -0
  332. mqt/core/include/nlohmann/detail/json_pointer.hpp +988 -0
  333. mqt/core/include/nlohmann/detail/json_ref.hpp +78 -0
  334. mqt/core/include/nlohmann/detail/macro_scope.hpp +595 -0
  335. mqt/core/include/nlohmann/detail/macro_unscope.hpp +46 -0
  336. mqt/core/include/nlohmann/detail/meta/call_std/begin.hpp +17 -0
  337. mqt/core/include/nlohmann/detail/meta/call_std/end.hpp +17 -0
  338. mqt/core/include/nlohmann/detail/meta/cpp_future.hpp +171 -0
  339. mqt/core/include/nlohmann/detail/meta/detected.hpp +70 -0
  340. mqt/core/include/nlohmann/detail/meta/identity_tag.hpp +21 -0
  341. mqt/core/include/nlohmann/detail/meta/is_sax.hpp +159 -0
  342. mqt/core/include/nlohmann/detail/meta/std_fs.hpp +29 -0
  343. mqt/core/include/nlohmann/detail/meta/type_traits.hpp +795 -0
  344. mqt/core/include/nlohmann/detail/meta/void_t.hpp +24 -0
  345. mqt/core/include/nlohmann/detail/output/binary_writer.hpp +1850 -0
  346. mqt/core/include/nlohmann/detail/output/output_adapters.hpp +147 -0
  347. mqt/core/include/nlohmann/detail/output/serializer.hpp +988 -0
  348. mqt/core/include/nlohmann/detail/string_concat.hpp +146 -0
  349. mqt/core/include/nlohmann/detail/string_escape.hpp +72 -0
  350. mqt/core/include/nlohmann/detail/string_utils.hpp +37 -0
  351. mqt/core/include/nlohmann/detail/value_t.hpp +118 -0
  352. mqt/core/include/nlohmann/json.hpp +5306 -0
  353. mqt/core/include/nlohmann/json_fwd.hpp +75 -0
  354. mqt/core/include/nlohmann/ordered_map.hpp +359 -0
  355. mqt/core/include/nlohmann/thirdparty/hedley/hedley.hpp +2045 -0
  356. mqt/core/include/nlohmann/thirdparty/hedley/hedley_undef.hpp +158 -0
  357. mqt/core/include/qdmi/qdmi/client.h +990 -0
  358. mqt/core/include/qdmi/qdmi/constants.h +1139 -0
  359. mqt/core/include/qdmi/qdmi/device.h +602 -0
  360. mqt/core/include/qdmi/qdmi/types.h +78 -0
  361. mqt/core/include/spdlog/async.h +99 -0
  362. mqt/core/include/spdlog/async_logger-inl.h +84 -0
  363. mqt/core/include/spdlog/async_logger.h +74 -0
  364. mqt/core/include/spdlog/cfg/argv.h +40 -0
  365. mqt/core/include/spdlog/cfg/env.h +36 -0
  366. mqt/core/include/spdlog/cfg/helpers-inl.h +107 -0
  367. mqt/core/include/spdlog/cfg/helpers.h +29 -0
  368. mqt/core/include/spdlog/common-inl.h +68 -0
  369. mqt/core/include/spdlog/common.h +406 -0
  370. mqt/core/include/spdlog/details/backtracer-inl.h +63 -0
  371. mqt/core/include/spdlog/details/backtracer.h +45 -0
  372. mqt/core/include/spdlog/details/circular_q.h +115 -0
  373. mqt/core/include/spdlog/details/console_globals.h +28 -0
  374. mqt/core/include/spdlog/details/file_helper-inl.h +153 -0
  375. mqt/core/include/spdlog/details/file_helper.h +61 -0
  376. mqt/core/include/spdlog/details/fmt_helper.h +141 -0
  377. mqt/core/include/spdlog/details/log_msg-inl.h +44 -0
  378. mqt/core/include/spdlog/details/log_msg.h +40 -0
  379. mqt/core/include/spdlog/details/log_msg_buffer-inl.h +54 -0
  380. mqt/core/include/spdlog/details/log_msg_buffer.h +32 -0
  381. mqt/core/include/spdlog/details/mpmc_blocking_q.h +177 -0
  382. mqt/core/include/spdlog/details/null_mutex.h +35 -0
  383. mqt/core/include/spdlog/details/os-inl.h +606 -0
  384. mqt/core/include/spdlog/details/os.h +127 -0
  385. mqt/core/include/spdlog/details/periodic_worker-inl.h +26 -0
  386. mqt/core/include/spdlog/details/periodic_worker.h +58 -0
  387. mqt/core/include/spdlog/details/registry-inl.h +270 -0
  388. mqt/core/include/spdlog/details/registry.h +131 -0
  389. mqt/core/include/spdlog/details/synchronous_factory.h +22 -0
  390. mqt/core/include/spdlog/details/tcp_client-windows.h +135 -0
  391. mqt/core/include/spdlog/details/tcp_client.h +127 -0
  392. mqt/core/include/spdlog/details/thread_pool-inl.h +126 -0
  393. mqt/core/include/spdlog/details/thread_pool.h +117 -0
  394. mqt/core/include/spdlog/details/udp_client-windows.h +98 -0
  395. mqt/core/include/spdlog/details/udp_client.h +81 -0
  396. mqt/core/include/spdlog/details/windows_include.h +11 -0
  397. mqt/core/include/spdlog/fmt/bin_to_hex.h +224 -0
  398. mqt/core/include/spdlog/fmt/bundled/args.h +220 -0
  399. mqt/core/include/spdlog/fmt/bundled/base.h +2989 -0
  400. mqt/core/include/spdlog/fmt/bundled/chrono.h +2330 -0
  401. mqt/core/include/spdlog/fmt/bundled/color.h +637 -0
  402. mqt/core/include/spdlog/fmt/bundled/compile.h +539 -0
  403. mqt/core/include/spdlog/fmt/bundled/core.h +5 -0
  404. mqt/core/include/spdlog/fmt/bundled/fmt.license.rst +27 -0
  405. mqt/core/include/spdlog/fmt/bundled/format-inl.h +1948 -0
  406. mqt/core/include/spdlog/fmt/bundled/format.h +4244 -0
  407. mqt/core/include/spdlog/fmt/bundled/os.h +427 -0
  408. mqt/core/include/spdlog/fmt/bundled/ostream.h +167 -0
  409. mqt/core/include/spdlog/fmt/bundled/printf.h +633 -0
  410. mqt/core/include/spdlog/fmt/bundled/ranges.h +850 -0
  411. mqt/core/include/spdlog/fmt/bundled/std.h +728 -0
  412. mqt/core/include/spdlog/fmt/bundled/xchar.h +369 -0
  413. mqt/core/include/spdlog/fmt/chrono.h +23 -0
  414. mqt/core/include/spdlog/fmt/compile.h +23 -0
  415. mqt/core/include/spdlog/fmt/fmt.h +30 -0
  416. mqt/core/include/spdlog/fmt/ostr.h +23 -0
  417. mqt/core/include/spdlog/fmt/ranges.h +23 -0
  418. mqt/core/include/spdlog/fmt/std.h +24 -0
  419. mqt/core/include/spdlog/fmt/xchar.h +23 -0
  420. mqt/core/include/spdlog/formatter.h +17 -0
  421. mqt/core/include/spdlog/fwd.h +18 -0
  422. mqt/core/include/spdlog/logger-inl.h +198 -0
  423. mqt/core/include/spdlog/logger.h +379 -0
  424. mqt/core/include/spdlog/mdc.h +52 -0
  425. mqt/core/include/spdlog/pattern_formatter-inl.h +1340 -0
  426. mqt/core/include/spdlog/pattern_formatter.h +118 -0
  427. mqt/core/include/spdlog/sinks/android_sink.h +137 -0
  428. mqt/core/include/spdlog/sinks/ansicolor_sink-inl.h +142 -0
  429. mqt/core/include/spdlog/sinks/ansicolor_sink.h +116 -0
  430. mqt/core/include/spdlog/sinks/base_sink-inl.h +59 -0
  431. mqt/core/include/spdlog/sinks/base_sink.h +51 -0
  432. mqt/core/include/spdlog/sinks/basic_file_sink-inl.h +48 -0
  433. mqt/core/include/spdlog/sinks/basic_file_sink.h +66 -0
  434. mqt/core/include/spdlog/sinks/callback_sink.h +56 -0
  435. mqt/core/include/spdlog/sinks/daily_file_sink.h +254 -0
  436. mqt/core/include/spdlog/sinks/dist_sink.h +81 -0
  437. mqt/core/include/spdlog/sinks/dup_filter_sink.h +91 -0
  438. mqt/core/include/spdlog/sinks/hourly_file_sink.h +193 -0
  439. mqt/core/include/spdlog/sinks/kafka_sink.h +119 -0
  440. mqt/core/include/spdlog/sinks/mongo_sink.h +108 -0
  441. mqt/core/include/spdlog/sinks/msvc_sink.h +68 -0
  442. mqt/core/include/spdlog/sinks/null_sink.h +41 -0
  443. mqt/core/include/spdlog/sinks/ostream_sink.h +43 -0
  444. mqt/core/include/spdlog/sinks/qt_sinks.h +304 -0
  445. mqt/core/include/spdlog/sinks/ringbuffer_sink.h +67 -0
  446. mqt/core/include/spdlog/sinks/rotating_file_sink-inl.h +179 -0
  447. mqt/core/include/spdlog/sinks/rotating_file_sink.h +93 -0
  448. mqt/core/include/spdlog/sinks/sink-inl.h +22 -0
  449. mqt/core/include/spdlog/sinks/sink.h +34 -0
  450. mqt/core/include/spdlog/sinks/stdout_color_sinks-inl.h +38 -0
  451. mqt/core/include/spdlog/sinks/stdout_color_sinks.h +49 -0
  452. mqt/core/include/spdlog/sinks/stdout_sinks-inl.h +127 -0
  453. mqt/core/include/spdlog/sinks/stdout_sinks.h +84 -0
  454. mqt/core/include/spdlog/sinks/syslog_sink.h +104 -0
  455. mqt/core/include/spdlog/sinks/systemd_sink.h +121 -0
  456. mqt/core/include/spdlog/sinks/tcp_sink.h +75 -0
  457. mqt/core/include/spdlog/sinks/udp_sink.h +69 -0
  458. mqt/core/include/spdlog/sinks/win_eventlog_sink.h +260 -0
  459. mqt/core/include/spdlog/sinks/wincolor_sink-inl.h +172 -0
  460. mqt/core/include/spdlog/sinks/wincolor_sink.h +82 -0
  461. mqt/core/include/spdlog/spdlog-inl.h +96 -0
  462. mqt/core/include/spdlog/spdlog.h +357 -0
  463. mqt/core/include/spdlog/stopwatch.h +66 -0
  464. mqt/core/include/spdlog/tweakme.h +148 -0
  465. mqt/core/include/spdlog/version.h +11 -0
  466. mqt/core/ir/__init__.pyi +2078 -0
  467. mqt/core/ir/operations.pyi +1011 -0
  468. mqt/core/ir/registers.pyi +91 -0
  469. mqt/core/ir/symbolic.pyi +177 -0
  470. mqt/core/ir.cpython-314t-darwin.so +0 -0
  471. mqt/core/lib/libmqt-core-algorithms.3.3.2.dylib +0 -0
  472. mqt/core/lib/libmqt-core-algorithms.3.3.dylib +0 -0
  473. mqt/core/lib/libmqt-core-algorithms.dylib +0 -0
  474. mqt/core/lib/libmqt-core-circuit-optimizer.3.3.2.dylib +0 -0
  475. mqt/core/lib/libmqt-core-circuit-optimizer.3.3.dylib +0 -0
  476. mqt/core/lib/libmqt-core-circuit-optimizer.dylib +0 -0
  477. mqt/core/lib/libmqt-core-dd.3.3.2.dylib +0 -0
  478. mqt/core/lib/libmqt-core-dd.3.3.dylib +0 -0
  479. mqt/core/lib/libmqt-core-dd.dylib +0 -0
  480. mqt/core/lib/libmqt-core-ds.3.3.2.dylib +0 -0
  481. mqt/core/lib/libmqt-core-ds.3.3.dylib +0 -0
  482. mqt/core/lib/libmqt-core-ds.dylib +0 -0
  483. mqt/core/lib/libmqt-core-fomac.3.3.2.dylib +0 -0
  484. mqt/core/lib/libmqt-core-fomac.3.3.dylib +0 -0
  485. mqt/core/lib/libmqt-core-fomac.dylib +0 -0
  486. mqt/core/lib/libmqt-core-ir.3.3.2.dylib +0 -0
  487. mqt/core/lib/libmqt-core-ir.3.3.dylib +0 -0
  488. mqt/core/lib/libmqt-core-ir.dylib +0 -0
  489. mqt/core/lib/libmqt-core-na-fomac.3.3.2.dylib +0 -0
  490. mqt/core/lib/libmqt-core-na-fomac.3.3.dylib +0 -0
  491. mqt/core/lib/libmqt-core-na-fomac.dylib +0 -0
  492. mqt/core/lib/libmqt-core-na.3.3.2.dylib +0 -0
  493. mqt/core/lib/libmqt-core-na.3.3.dylib +0 -0
  494. mqt/core/lib/libmqt-core-na.dylib +0 -0
  495. mqt/core/lib/libmqt-core-qasm.3.3.2.dylib +0 -0
  496. mqt/core/lib/libmqt-core-qasm.3.3.dylib +0 -0
  497. mqt/core/lib/libmqt-core-qasm.dylib +0 -0
  498. mqt/core/lib/libmqt-core-qdmi-driver.3.3.2.dylib +0 -0
  499. mqt/core/lib/libmqt-core-qdmi-driver.3.3.dylib +0 -0
  500. mqt/core/lib/libmqt-core-qdmi-driver.dylib +0 -0
  501. mqt/core/lib/libmqt-core-qdmi-na-device-gen.a +0 -0
  502. mqt/core/lib/libmqt-core-qdmi-na-device.3.3.2.dylib +0 -0
  503. mqt/core/lib/libmqt-core-qdmi-na-device.3.3.dylib +0 -0
  504. mqt/core/lib/libmqt-core-qdmi-na-device.dylib +0 -0
  505. mqt/core/lib/libmqt-core-zx.3.3.2.dylib +0 -0
  506. mqt/core/lib/libmqt-core-zx.3.3.dylib +0 -0
  507. mqt/core/lib/libmqt-core-zx.dylib +0 -0
  508. mqt/core/lib/libspdlog.a +0 -0
  509. mqt/core/lib/pkgconfig/spdlog.pc +13 -0
  510. mqt/core/na/__init__.py +12 -0
  511. mqt/core/na/fomac.cpython-314t-darwin.so +0 -0
  512. mqt/core/na/fomac.pyi +117 -0
  513. mqt/core/plugins/__init__.py +9 -0
  514. mqt/core/plugins/qiskit/__init__.py +19 -0
  515. mqt/core/plugins/qiskit/mqt_to_qiskit.py +420 -0
  516. mqt/core/plugins/qiskit/qiskit_to_mqt.py +562 -0
  517. mqt/core/py.typed +2 -0
  518. mqt/core/share/cmake/mqt-core/AddMQTPythonBinding.cmake +55 -0
  519. mqt/core/share/cmake/mqt-core/Cache.cmake +33 -0
  520. mqt/core/share/cmake/mqt-core/FindGMP.cmake +103 -0
  521. mqt/core/share/cmake/mqt-core/PackageAddTest.cmake +46 -0
  522. mqt/core/share/cmake/mqt-core/PreventInSourceBuilds.cmake +25 -0
  523. mqt/core/share/cmake/mqt-core/StandardProjectSettings.cmake +87 -0
  524. mqt/core/share/cmake/mqt-core/mqt-core-config-version.cmake +85 -0
  525. mqt/core/share/cmake/mqt-core/mqt-core-config.cmake +52 -0
  526. mqt/core/share/cmake/mqt-core/mqt-core-targets-release.cmake +141 -0
  527. mqt/core/share/cmake/mqt-core/mqt-core-targets.cmake +446 -0
  528. mqt/core/share/cmake/nlohmann_json/nlohmann_jsonConfig.cmake +15 -0
  529. mqt/core/share/cmake/nlohmann_json/nlohmann_jsonConfigVersion.cmake +20 -0
  530. mqt/core/share/cmake/nlohmann_json/nlohmann_jsonTargets.cmake +109 -0
  531. mqt/core/share/cmake/qdmi/Cache.cmake +44 -0
  532. mqt/core/share/cmake/qdmi/PrefixHandling.cmake +78 -0
  533. mqt/core/share/cmake/qdmi/prefix_defs.txt +26 -0
  534. mqt/core/share/cmake/qdmi/qdmi-config-version.cmake +85 -0
  535. mqt/core/share/cmake/qdmi/qdmi-config.cmake +42 -0
  536. mqt/core/share/cmake/qdmi/qdmi-targets.cmake +129 -0
  537. mqt/core/share/cmake/spdlog/spdlogConfig.cmake +44 -0
  538. mqt/core/share/cmake/spdlog/spdlogConfigTargets-release.cmake +19 -0
  539. mqt/core/share/cmake/spdlog/spdlogConfigTargets.cmake +118 -0
  540. mqt/core/share/cmake/spdlog/spdlogConfigVersion.cmake +65 -0
  541. mqt/core/share/pkgconfig/nlohmann_json.pc +7 -0
  542. mqt_core-3.3.2.dist-info/METADATA +210 -0
  543. mqt_core-3.3.2.dist-info/RECORD +546 -0
  544. mqt_core-3.3.2.dist-info/WHEEL +6 -0
  545. mqt_core-3.3.2.dist-info/entry_points.txt +4 -0
  546. mqt_core-3.3.2.dist-info/licenses/LICENSE.md +22 -0
@@ -0,0 +1,2045 @@
1
+ #pragma once
2
+
3
+ // __ _____ _____ _____
4
+ // __| | __| | | | JSON for Modern C++
5
+ // | | |__ | | | | | | version 3.12.0
6
+ // |_____|_____|_____|_|___| https://github.com/nlohmann/json
7
+ //
8
+ // SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann <https://nlohmann.me>
9
+ // SPDX-FileCopyrightText: 2016 - 2021 Evan Nemerson <evan@nemerson.com>
10
+ // SPDX-License-Identifier: MIT
11
+
12
+ /* Hedley - https://nemequ.github.io/hedley
13
+ * Created by Evan Nemerson <evan@nemerson.com>
14
+ */
15
+
16
+ #if !defined(JSON_HEDLEY_VERSION) || (JSON_HEDLEY_VERSION < 15)
17
+ #if defined(JSON_HEDLEY_VERSION)
18
+ #undef JSON_HEDLEY_VERSION
19
+ #endif
20
+ #define JSON_HEDLEY_VERSION 15
21
+
22
+ #if defined(JSON_HEDLEY_STRINGIFY_EX)
23
+ #undef JSON_HEDLEY_STRINGIFY_EX
24
+ #endif
25
+ #define JSON_HEDLEY_STRINGIFY_EX(x) #x
26
+
27
+ #if defined(JSON_HEDLEY_STRINGIFY)
28
+ #undef JSON_HEDLEY_STRINGIFY
29
+ #endif
30
+ #define JSON_HEDLEY_STRINGIFY(x) JSON_HEDLEY_STRINGIFY_EX(x)
31
+
32
+ #if defined(JSON_HEDLEY_CONCAT_EX)
33
+ #undef JSON_HEDLEY_CONCAT_EX
34
+ #endif
35
+ #define JSON_HEDLEY_CONCAT_EX(a,b) a##b
36
+
37
+ #if defined(JSON_HEDLEY_CONCAT)
38
+ #undef JSON_HEDLEY_CONCAT
39
+ #endif
40
+ #define JSON_HEDLEY_CONCAT(a,b) JSON_HEDLEY_CONCAT_EX(a,b)
41
+
42
+ #if defined(JSON_HEDLEY_CONCAT3_EX)
43
+ #undef JSON_HEDLEY_CONCAT3_EX
44
+ #endif
45
+ #define JSON_HEDLEY_CONCAT3_EX(a,b,c) a##b##c
46
+
47
+ #if defined(JSON_HEDLEY_CONCAT3)
48
+ #undef JSON_HEDLEY_CONCAT3
49
+ #endif
50
+ #define JSON_HEDLEY_CONCAT3(a,b,c) JSON_HEDLEY_CONCAT3_EX(a,b,c)
51
+
52
+ #if defined(JSON_HEDLEY_VERSION_ENCODE)
53
+ #undef JSON_HEDLEY_VERSION_ENCODE
54
+ #endif
55
+ #define JSON_HEDLEY_VERSION_ENCODE(major,minor,revision) (((major) * 1000000) + ((minor) * 1000) + (revision))
56
+
57
+ #if defined(JSON_HEDLEY_VERSION_DECODE_MAJOR)
58
+ #undef JSON_HEDLEY_VERSION_DECODE_MAJOR
59
+ #endif
60
+ #define JSON_HEDLEY_VERSION_DECODE_MAJOR(version) ((version) / 1000000)
61
+
62
+ #if defined(JSON_HEDLEY_VERSION_DECODE_MINOR)
63
+ #undef JSON_HEDLEY_VERSION_DECODE_MINOR
64
+ #endif
65
+ #define JSON_HEDLEY_VERSION_DECODE_MINOR(version) (((version) % 1000000) / 1000)
66
+
67
+ #if defined(JSON_HEDLEY_VERSION_DECODE_REVISION)
68
+ #undef JSON_HEDLEY_VERSION_DECODE_REVISION
69
+ #endif
70
+ #define JSON_HEDLEY_VERSION_DECODE_REVISION(version) ((version) % 1000)
71
+
72
+ #if defined(JSON_HEDLEY_GNUC_VERSION)
73
+ #undef JSON_HEDLEY_GNUC_VERSION
74
+ #endif
75
+ #if defined(__GNUC__) && defined(__GNUC_PATCHLEVEL__)
76
+ #define JSON_HEDLEY_GNUC_VERSION JSON_HEDLEY_VERSION_ENCODE(__GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__)
77
+ #elif defined(__GNUC__)
78
+ #define JSON_HEDLEY_GNUC_VERSION JSON_HEDLEY_VERSION_ENCODE(__GNUC__, __GNUC_MINOR__, 0)
79
+ #endif
80
+
81
+ #if defined(JSON_HEDLEY_GNUC_VERSION_CHECK)
82
+ #undef JSON_HEDLEY_GNUC_VERSION_CHECK
83
+ #endif
84
+ #if defined(JSON_HEDLEY_GNUC_VERSION)
85
+ #define JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_GNUC_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch))
86
+ #else
87
+ #define JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch) (0)
88
+ #endif
89
+
90
+ #if defined(JSON_HEDLEY_MSVC_VERSION)
91
+ #undef JSON_HEDLEY_MSVC_VERSION
92
+ #endif
93
+ #if defined(_MSC_FULL_VER) && (_MSC_FULL_VER >= 140000000) && !defined(__ICL)
94
+ #define JSON_HEDLEY_MSVC_VERSION JSON_HEDLEY_VERSION_ENCODE(_MSC_FULL_VER / 10000000, (_MSC_FULL_VER % 10000000) / 100000, (_MSC_FULL_VER % 100000) / 100)
95
+ #elif defined(_MSC_FULL_VER) && !defined(__ICL)
96
+ #define JSON_HEDLEY_MSVC_VERSION JSON_HEDLEY_VERSION_ENCODE(_MSC_FULL_VER / 1000000, (_MSC_FULL_VER % 1000000) / 10000, (_MSC_FULL_VER % 10000) / 10)
97
+ #elif defined(_MSC_VER) && !defined(__ICL)
98
+ #define JSON_HEDLEY_MSVC_VERSION JSON_HEDLEY_VERSION_ENCODE(_MSC_VER / 100, _MSC_VER % 100, 0)
99
+ #endif
100
+
101
+ #if defined(JSON_HEDLEY_MSVC_VERSION_CHECK)
102
+ #undef JSON_HEDLEY_MSVC_VERSION_CHECK
103
+ #endif
104
+ #if !defined(JSON_HEDLEY_MSVC_VERSION)
105
+ #define JSON_HEDLEY_MSVC_VERSION_CHECK(major,minor,patch) (0)
106
+ #elif defined(_MSC_VER) && (_MSC_VER >= 1400)
107
+ #define JSON_HEDLEY_MSVC_VERSION_CHECK(major,minor,patch) (_MSC_FULL_VER >= ((major * 10000000) + (minor * 100000) + (patch)))
108
+ #elif defined(_MSC_VER) && (_MSC_VER >= 1200)
109
+ #define JSON_HEDLEY_MSVC_VERSION_CHECK(major,minor,patch) (_MSC_FULL_VER >= ((major * 1000000) + (minor * 10000) + (patch)))
110
+ #else
111
+ #define JSON_HEDLEY_MSVC_VERSION_CHECK(major,minor,patch) (_MSC_VER >= ((major * 100) + (minor)))
112
+ #endif
113
+
114
+ #if defined(JSON_HEDLEY_INTEL_VERSION)
115
+ #undef JSON_HEDLEY_INTEL_VERSION
116
+ #endif
117
+ #if defined(__INTEL_COMPILER) && defined(__INTEL_COMPILER_UPDATE) && !defined(__ICL)
118
+ #define JSON_HEDLEY_INTEL_VERSION JSON_HEDLEY_VERSION_ENCODE(__INTEL_COMPILER / 100, __INTEL_COMPILER % 100, __INTEL_COMPILER_UPDATE)
119
+ #elif defined(__INTEL_COMPILER) && !defined(__ICL)
120
+ #define JSON_HEDLEY_INTEL_VERSION JSON_HEDLEY_VERSION_ENCODE(__INTEL_COMPILER / 100, __INTEL_COMPILER % 100, 0)
121
+ #endif
122
+
123
+ #if defined(JSON_HEDLEY_INTEL_VERSION_CHECK)
124
+ #undef JSON_HEDLEY_INTEL_VERSION_CHECK
125
+ #endif
126
+ #if defined(JSON_HEDLEY_INTEL_VERSION)
127
+ #define JSON_HEDLEY_INTEL_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_INTEL_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch))
128
+ #else
129
+ #define JSON_HEDLEY_INTEL_VERSION_CHECK(major,minor,patch) (0)
130
+ #endif
131
+
132
+ #if defined(JSON_HEDLEY_INTEL_CL_VERSION)
133
+ #undef JSON_HEDLEY_INTEL_CL_VERSION
134
+ #endif
135
+ #if defined(__INTEL_COMPILER) && defined(__INTEL_COMPILER_UPDATE) && defined(__ICL)
136
+ #define JSON_HEDLEY_INTEL_CL_VERSION JSON_HEDLEY_VERSION_ENCODE(__INTEL_COMPILER, __INTEL_COMPILER_UPDATE, 0)
137
+ #endif
138
+
139
+ #if defined(JSON_HEDLEY_INTEL_CL_VERSION_CHECK)
140
+ #undef JSON_HEDLEY_INTEL_CL_VERSION_CHECK
141
+ #endif
142
+ #if defined(JSON_HEDLEY_INTEL_CL_VERSION)
143
+ #define JSON_HEDLEY_INTEL_CL_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_INTEL_CL_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch))
144
+ #else
145
+ #define JSON_HEDLEY_INTEL_CL_VERSION_CHECK(major,minor,patch) (0)
146
+ #endif
147
+
148
+ #if defined(JSON_HEDLEY_PGI_VERSION)
149
+ #undef JSON_HEDLEY_PGI_VERSION
150
+ #endif
151
+ #if defined(__PGI) && defined(__PGIC__) && defined(__PGIC_MINOR__) && defined(__PGIC_PATCHLEVEL__)
152
+ #define JSON_HEDLEY_PGI_VERSION JSON_HEDLEY_VERSION_ENCODE(__PGIC__, __PGIC_MINOR__, __PGIC_PATCHLEVEL__)
153
+ #endif
154
+
155
+ #if defined(JSON_HEDLEY_PGI_VERSION_CHECK)
156
+ #undef JSON_HEDLEY_PGI_VERSION_CHECK
157
+ #endif
158
+ #if defined(JSON_HEDLEY_PGI_VERSION)
159
+ #define JSON_HEDLEY_PGI_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_PGI_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch))
160
+ #else
161
+ #define JSON_HEDLEY_PGI_VERSION_CHECK(major,minor,patch) (0)
162
+ #endif
163
+
164
+ #if defined(JSON_HEDLEY_SUNPRO_VERSION)
165
+ #undef JSON_HEDLEY_SUNPRO_VERSION
166
+ #endif
167
+ #if defined(__SUNPRO_C) && (__SUNPRO_C > 0x1000)
168
+ #define JSON_HEDLEY_SUNPRO_VERSION JSON_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)
169
+ #elif defined(__SUNPRO_C)
170
+ #define JSON_HEDLEY_SUNPRO_VERSION JSON_HEDLEY_VERSION_ENCODE((__SUNPRO_C >> 8) & 0xf, (__SUNPRO_C >> 4) & 0xf, (__SUNPRO_C) & 0xf)
171
+ #elif defined(__SUNPRO_CC) && (__SUNPRO_CC > 0x1000)
172
+ #define JSON_HEDLEY_SUNPRO_VERSION JSON_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)
173
+ #elif defined(__SUNPRO_CC)
174
+ #define JSON_HEDLEY_SUNPRO_VERSION JSON_HEDLEY_VERSION_ENCODE((__SUNPRO_CC >> 8) & 0xf, (__SUNPRO_CC >> 4) & 0xf, (__SUNPRO_CC) & 0xf)
175
+ #endif
176
+
177
+ #if defined(JSON_HEDLEY_SUNPRO_VERSION_CHECK)
178
+ #undef JSON_HEDLEY_SUNPRO_VERSION_CHECK
179
+ #endif
180
+ #if defined(JSON_HEDLEY_SUNPRO_VERSION)
181
+ #define JSON_HEDLEY_SUNPRO_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_SUNPRO_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch))
182
+ #else
183
+ #define JSON_HEDLEY_SUNPRO_VERSION_CHECK(major,minor,patch) (0)
184
+ #endif
185
+
186
+ #if defined(JSON_HEDLEY_EMSCRIPTEN_VERSION)
187
+ #undef JSON_HEDLEY_EMSCRIPTEN_VERSION
188
+ #endif
189
+ #if defined(__EMSCRIPTEN__)
190
+ #define JSON_HEDLEY_EMSCRIPTEN_VERSION JSON_HEDLEY_VERSION_ENCODE(__EMSCRIPTEN_major__, __EMSCRIPTEN_minor__, __EMSCRIPTEN_tiny__)
191
+ #endif
192
+
193
+ #if defined(JSON_HEDLEY_EMSCRIPTEN_VERSION_CHECK)
194
+ #undef JSON_HEDLEY_EMSCRIPTEN_VERSION_CHECK
195
+ #endif
196
+ #if defined(JSON_HEDLEY_EMSCRIPTEN_VERSION)
197
+ #define JSON_HEDLEY_EMSCRIPTEN_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_EMSCRIPTEN_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch))
198
+ #else
199
+ #define JSON_HEDLEY_EMSCRIPTEN_VERSION_CHECK(major,minor,patch) (0)
200
+ #endif
201
+
202
+ #if defined(JSON_HEDLEY_ARM_VERSION)
203
+ #undef JSON_HEDLEY_ARM_VERSION
204
+ #endif
205
+ #if defined(__CC_ARM) && defined(__ARMCOMPILER_VERSION)
206
+ #define JSON_HEDLEY_ARM_VERSION JSON_HEDLEY_VERSION_ENCODE(__ARMCOMPILER_VERSION / 1000000, (__ARMCOMPILER_VERSION % 1000000) / 10000, (__ARMCOMPILER_VERSION % 10000) / 100)
207
+ #elif defined(__CC_ARM) && defined(__ARMCC_VERSION)
208
+ #define JSON_HEDLEY_ARM_VERSION JSON_HEDLEY_VERSION_ENCODE(__ARMCC_VERSION / 1000000, (__ARMCC_VERSION % 1000000) / 10000, (__ARMCC_VERSION % 10000) / 100)
209
+ #endif
210
+
211
+ #if defined(JSON_HEDLEY_ARM_VERSION_CHECK)
212
+ #undef JSON_HEDLEY_ARM_VERSION_CHECK
213
+ #endif
214
+ #if defined(JSON_HEDLEY_ARM_VERSION)
215
+ #define JSON_HEDLEY_ARM_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_ARM_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch))
216
+ #else
217
+ #define JSON_HEDLEY_ARM_VERSION_CHECK(major,minor,patch) (0)
218
+ #endif
219
+
220
+ #if defined(JSON_HEDLEY_IBM_VERSION)
221
+ #undef JSON_HEDLEY_IBM_VERSION
222
+ #endif
223
+ #if defined(__ibmxl__)
224
+ #define JSON_HEDLEY_IBM_VERSION JSON_HEDLEY_VERSION_ENCODE(__ibmxl_version__, __ibmxl_release__, __ibmxl_modification__)
225
+ #elif defined(__xlC__) && defined(__xlC_ver__)
226
+ #define JSON_HEDLEY_IBM_VERSION JSON_HEDLEY_VERSION_ENCODE(__xlC__ >> 8, __xlC__ & 0xff, (__xlC_ver__ >> 8) & 0xff)
227
+ #elif defined(__xlC__)
228
+ #define JSON_HEDLEY_IBM_VERSION JSON_HEDLEY_VERSION_ENCODE(__xlC__ >> 8, __xlC__ & 0xff, 0)
229
+ #endif
230
+
231
+ #if defined(JSON_HEDLEY_IBM_VERSION_CHECK)
232
+ #undef JSON_HEDLEY_IBM_VERSION_CHECK
233
+ #endif
234
+ #if defined(JSON_HEDLEY_IBM_VERSION)
235
+ #define JSON_HEDLEY_IBM_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_IBM_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch))
236
+ #else
237
+ #define JSON_HEDLEY_IBM_VERSION_CHECK(major,minor,patch) (0)
238
+ #endif
239
+
240
+ #if defined(JSON_HEDLEY_TI_VERSION)
241
+ #undef JSON_HEDLEY_TI_VERSION
242
+ #endif
243
+ #if \
244
+ defined(__TI_COMPILER_VERSION__) && \
245
+ ( \
246
+ defined(__TMS470__) || defined(__TI_ARM__) || \
247
+ defined(__MSP430__) || \
248
+ defined(__TMS320C2000__) \
249
+ )
250
+ #if (__TI_COMPILER_VERSION__ >= 16000000)
251
+ #define JSON_HEDLEY_TI_VERSION JSON_HEDLEY_VERSION_ENCODE(__TI_COMPILER_VERSION__ / 1000000, (__TI_COMPILER_VERSION__ % 1000000) / 1000, (__TI_COMPILER_VERSION__ % 1000))
252
+ #endif
253
+ #endif
254
+
255
+ #if defined(JSON_HEDLEY_TI_VERSION_CHECK)
256
+ #undef JSON_HEDLEY_TI_VERSION_CHECK
257
+ #endif
258
+ #if defined(JSON_HEDLEY_TI_VERSION)
259
+ #define JSON_HEDLEY_TI_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_TI_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch))
260
+ #else
261
+ #define JSON_HEDLEY_TI_VERSION_CHECK(major,minor,patch) (0)
262
+ #endif
263
+
264
+ #if defined(JSON_HEDLEY_TI_CL2000_VERSION)
265
+ #undef JSON_HEDLEY_TI_CL2000_VERSION
266
+ #endif
267
+ #if defined(__TI_COMPILER_VERSION__) && defined(__TMS320C2000__)
268
+ #define JSON_HEDLEY_TI_CL2000_VERSION JSON_HEDLEY_VERSION_ENCODE(__TI_COMPILER_VERSION__ / 1000000, (__TI_COMPILER_VERSION__ % 1000000) / 1000, (__TI_COMPILER_VERSION__ % 1000))
269
+ #endif
270
+
271
+ #if defined(JSON_HEDLEY_TI_CL2000_VERSION_CHECK)
272
+ #undef JSON_HEDLEY_TI_CL2000_VERSION_CHECK
273
+ #endif
274
+ #if defined(JSON_HEDLEY_TI_CL2000_VERSION)
275
+ #define JSON_HEDLEY_TI_CL2000_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_TI_CL2000_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch))
276
+ #else
277
+ #define JSON_HEDLEY_TI_CL2000_VERSION_CHECK(major,minor,patch) (0)
278
+ #endif
279
+
280
+ #if defined(JSON_HEDLEY_TI_CL430_VERSION)
281
+ #undef JSON_HEDLEY_TI_CL430_VERSION
282
+ #endif
283
+ #if defined(__TI_COMPILER_VERSION__) && defined(__MSP430__)
284
+ #define JSON_HEDLEY_TI_CL430_VERSION JSON_HEDLEY_VERSION_ENCODE(__TI_COMPILER_VERSION__ / 1000000, (__TI_COMPILER_VERSION__ % 1000000) / 1000, (__TI_COMPILER_VERSION__ % 1000))
285
+ #endif
286
+
287
+ #if defined(JSON_HEDLEY_TI_CL430_VERSION_CHECK)
288
+ #undef JSON_HEDLEY_TI_CL430_VERSION_CHECK
289
+ #endif
290
+ #if defined(JSON_HEDLEY_TI_CL430_VERSION)
291
+ #define JSON_HEDLEY_TI_CL430_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_TI_CL430_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch))
292
+ #else
293
+ #define JSON_HEDLEY_TI_CL430_VERSION_CHECK(major,minor,patch) (0)
294
+ #endif
295
+
296
+ #if defined(JSON_HEDLEY_TI_ARMCL_VERSION)
297
+ #undef JSON_HEDLEY_TI_ARMCL_VERSION
298
+ #endif
299
+ #if defined(__TI_COMPILER_VERSION__) && (defined(__TMS470__) || defined(__TI_ARM__))
300
+ #define JSON_HEDLEY_TI_ARMCL_VERSION JSON_HEDLEY_VERSION_ENCODE(__TI_COMPILER_VERSION__ / 1000000, (__TI_COMPILER_VERSION__ % 1000000) / 1000, (__TI_COMPILER_VERSION__ % 1000))
301
+ #endif
302
+
303
+ #if defined(JSON_HEDLEY_TI_ARMCL_VERSION_CHECK)
304
+ #undef JSON_HEDLEY_TI_ARMCL_VERSION_CHECK
305
+ #endif
306
+ #if defined(JSON_HEDLEY_TI_ARMCL_VERSION)
307
+ #define JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_TI_ARMCL_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch))
308
+ #else
309
+ #define JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(major,minor,patch) (0)
310
+ #endif
311
+
312
+ #if defined(JSON_HEDLEY_TI_CL6X_VERSION)
313
+ #undef JSON_HEDLEY_TI_CL6X_VERSION
314
+ #endif
315
+ #if defined(__TI_COMPILER_VERSION__) && defined(__TMS320C6X__)
316
+ #define JSON_HEDLEY_TI_CL6X_VERSION JSON_HEDLEY_VERSION_ENCODE(__TI_COMPILER_VERSION__ / 1000000, (__TI_COMPILER_VERSION__ % 1000000) / 1000, (__TI_COMPILER_VERSION__ % 1000))
317
+ #endif
318
+
319
+ #if defined(JSON_HEDLEY_TI_CL6X_VERSION_CHECK)
320
+ #undef JSON_HEDLEY_TI_CL6X_VERSION_CHECK
321
+ #endif
322
+ #if defined(JSON_HEDLEY_TI_CL6X_VERSION)
323
+ #define JSON_HEDLEY_TI_CL6X_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_TI_CL6X_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch))
324
+ #else
325
+ #define JSON_HEDLEY_TI_CL6X_VERSION_CHECK(major,minor,patch) (0)
326
+ #endif
327
+
328
+ #if defined(JSON_HEDLEY_TI_CL7X_VERSION)
329
+ #undef JSON_HEDLEY_TI_CL7X_VERSION
330
+ #endif
331
+ #if defined(__TI_COMPILER_VERSION__) && defined(__C7000__)
332
+ #define JSON_HEDLEY_TI_CL7X_VERSION JSON_HEDLEY_VERSION_ENCODE(__TI_COMPILER_VERSION__ / 1000000, (__TI_COMPILER_VERSION__ % 1000000) / 1000, (__TI_COMPILER_VERSION__ % 1000))
333
+ #endif
334
+
335
+ #if defined(JSON_HEDLEY_TI_CL7X_VERSION_CHECK)
336
+ #undef JSON_HEDLEY_TI_CL7X_VERSION_CHECK
337
+ #endif
338
+ #if defined(JSON_HEDLEY_TI_CL7X_VERSION)
339
+ #define JSON_HEDLEY_TI_CL7X_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_TI_CL7X_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch))
340
+ #else
341
+ #define JSON_HEDLEY_TI_CL7X_VERSION_CHECK(major,minor,patch) (0)
342
+ #endif
343
+
344
+ #if defined(JSON_HEDLEY_TI_CLPRU_VERSION)
345
+ #undef JSON_HEDLEY_TI_CLPRU_VERSION
346
+ #endif
347
+ #if defined(__TI_COMPILER_VERSION__) && defined(__PRU__)
348
+ #define JSON_HEDLEY_TI_CLPRU_VERSION JSON_HEDLEY_VERSION_ENCODE(__TI_COMPILER_VERSION__ / 1000000, (__TI_COMPILER_VERSION__ % 1000000) / 1000, (__TI_COMPILER_VERSION__ % 1000))
349
+ #endif
350
+
351
+ #if defined(JSON_HEDLEY_TI_CLPRU_VERSION_CHECK)
352
+ #undef JSON_HEDLEY_TI_CLPRU_VERSION_CHECK
353
+ #endif
354
+ #if defined(JSON_HEDLEY_TI_CLPRU_VERSION)
355
+ #define JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_TI_CLPRU_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch))
356
+ #else
357
+ #define JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(major,minor,patch) (0)
358
+ #endif
359
+
360
+ #if defined(JSON_HEDLEY_CRAY_VERSION)
361
+ #undef JSON_HEDLEY_CRAY_VERSION
362
+ #endif
363
+ #if defined(_CRAYC)
364
+ #if defined(_RELEASE_PATCHLEVEL)
365
+ #define JSON_HEDLEY_CRAY_VERSION JSON_HEDLEY_VERSION_ENCODE(_RELEASE_MAJOR, _RELEASE_MINOR, _RELEASE_PATCHLEVEL)
366
+ #else
367
+ #define JSON_HEDLEY_CRAY_VERSION JSON_HEDLEY_VERSION_ENCODE(_RELEASE_MAJOR, _RELEASE_MINOR, 0)
368
+ #endif
369
+ #endif
370
+
371
+ #if defined(JSON_HEDLEY_CRAY_VERSION_CHECK)
372
+ #undef JSON_HEDLEY_CRAY_VERSION_CHECK
373
+ #endif
374
+ #if defined(JSON_HEDLEY_CRAY_VERSION)
375
+ #define JSON_HEDLEY_CRAY_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_CRAY_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch))
376
+ #else
377
+ #define JSON_HEDLEY_CRAY_VERSION_CHECK(major,minor,patch) (0)
378
+ #endif
379
+
380
+ #if defined(JSON_HEDLEY_IAR_VERSION)
381
+ #undef JSON_HEDLEY_IAR_VERSION
382
+ #endif
383
+ #if defined(__IAR_SYSTEMS_ICC__)
384
+ #if __VER__ > 1000
385
+ #define JSON_HEDLEY_IAR_VERSION JSON_HEDLEY_VERSION_ENCODE((__VER__ / 1000000), ((__VER__ / 1000) % 1000), (__VER__ % 1000))
386
+ #else
387
+ #define JSON_HEDLEY_IAR_VERSION JSON_HEDLEY_VERSION_ENCODE(__VER__ / 100, __VER__ % 100, 0)
388
+ #endif
389
+ #endif
390
+
391
+ #if defined(JSON_HEDLEY_IAR_VERSION_CHECK)
392
+ #undef JSON_HEDLEY_IAR_VERSION_CHECK
393
+ #endif
394
+ #if defined(JSON_HEDLEY_IAR_VERSION)
395
+ #define JSON_HEDLEY_IAR_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_IAR_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch))
396
+ #else
397
+ #define JSON_HEDLEY_IAR_VERSION_CHECK(major,minor,patch) (0)
398
+ #endif
399
+
400
+ #if defined(JSON_HEDLEY_TINYC_VERSION)
401
+ #undef JSON_HEDLEY_TINYC_VERSION
402
+ #endif
403
+ #if defined(__TINYC__)
404
+ #define JSON_HEDLEY_TINYC_VERSION JSON_HEDLEY_VERSION_ENCODE(__TINYC__ / 1000, (__TINYC__ / 100) % 10, __TINYC__ % 100)
405
+ #endif
406
+
407
+ #if defined(JSON_HEDLEY_TINYC_VERSION_CHECK)
408
+ #undef JSON_HEDLEY_TINYC_VERSION_CHECK
409
+ #endif
410
+ #if defined(JSON_HEDLEY_TINYC_VERSION)
411
+ #define JSON_HEDLEY_TINYC_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_TINYC_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch))
412
+ #else
413
+ #define JSON_HEDLEY_TINYC_VERSION_CHECK(major,minor,patch) (0)
414
+ #endif
415
+
416
+ #if defined(JSON_HEDLEY_DMC_VERSION)
417
+ #undef JSON_HEDLEY_DMC_VERSION
418
+ #endif
419
+ #if defined(__DMC__)
420
+ #define JSON_HEDLEY_DMC_VERSION JSON_HEDLEY_VERSION_ENCODE(__DMC__ >> 8, (__DMC__ >> 4) & 0xf, __DMC__ & 0xf)
421
+ #endif
422
+
423
+ #if defined(JSON_HEDLEY_DMC_VERSION_CHECK)
424
+ #undef JSON_HEDLEY_DMC_VERSION_CHECK
425
+ #endif
426
+ #if defined(JSON_HEDLEY_DMC_VERSION)
427
+ #define JSON_HEDLEY_DMC_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_DMC_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch))
428
+ #else
429
+ #define JSON_HEDLEY_DMC_VERSION_CHECK(major,minor,patch) (0)
430
+ #endif
431
+
432
+ #if defined(JSON_HEDLEY_COMPCERT_VERSION)
433
+ #undef JSON_HEDLEY_COMPCERT_VERSION
434
+ #endif
435
+ #if defined(__COMPCERT_VERSION__)
436
+ #define JSON_HEDLEY_COMPCERT_VERSION JSON_HEDLEY_VERSION_ENCODE(__COMPCERT_VERSION__ / 10000, (__COMPCERT_VERSION__ / 100) % 100, __COMPCERT_VERSION__ % 100)
437
+ #endif
438
+
439
+ #if defined(JSON_HEDLEY_COMPCERT_VERSION_CHECK)
440
+ #undef JSON_HEDLEY_COMPCERT_VERSION_CHECK
441
+ #endif
442
+ #if defined(JSON_HEDLEY_COMPCERT_VERSION)
443
+ #define JSON_HEDLEY_COMPCERT_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_COMPCERT_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch))
444
+ #else
445
+ #define JSON_HEDLEY_COMPCERT_VERSION_CHECK(major,minor,patch) (0)
446
+ #endif
447
+
448
+ #if defined(JSON_HEDLEY_PELLES_VERSION)
449
+ #undef JSON_HEDLEY_PELLES_VERSION
450
+ #endif
451
+ #if defined(__POCC__)
452
+ #define JSON_HEDLEY_PELLES_VERSION JSON_HEDLEY_VERSION_ENCODE(__POCC__ / 100, __POCC__ % 100, 0)
453
+ #endif
454
+
455
+ #if defined(JSON_HEDLEY_PELLES_VERSION_CHECK)
456
+ #undef JSON_HEDLEY_PELLES_VERSION_CHECK
457
+ #endif
458
+ #if defined(JSON_HEDLEY_PELLES_VERSION)
459
+ #define JSON_HEDLEY_PELLES_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_PELLES_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch))
460
+ #else
461
+ #define JSON_HEDLEY_PELLES_VERSION_CHECK(major,minor,patch) (0)
462
+ #endif
463
+
464
+ #if defined(JSON_HEDLEY_MCST_LCC_VERSION)
465
+ #undef JSON_HEDLEY_MCST_LCC_VERSION
466
+ #endif
467
+ #if defined(__LCC__) && defined(__LCC_MINOR__)
468
+ #define JSON_HEDLEY_MCST_LCC_VERSION JSON_HEDLEY_VERSION_ENCODE(__LCC__ / 100, __LCC__ % 100, __LCC_MINOR__)
469
+ #endif
470
+
471
+ #if defined(JSON_HEDLEY_MCST_LCC_VERSION_CHECK)
472
+ #undef JSON_HEDLEY_MCST_LCC_VERSION_CHECK
473
+ #endif
474
+ #if defined(JSON_HEDLEY_MCST_LCC_VERSION)
475
+ #define JSON_HEDLEY_MCST_LCC_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_MCST_LCC_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch))
476
+ #else
477
+ #define JSON_HEDLEY_MCST_LCC_VERSION_CHECK(major,minor,patch) (0)
478
+ #endif
479
+
480
+ #if defined(JSON_HEDLEY_GCC_VERSION)
481
+ #undef JSON_HEDLEY_GCC_VERSION
482
+ #endif
483
+ #if \
484
+ defined(JSON_HEDLEY_GNUC_VERSION) && \
485
+ !defined(__clang__) && \
486
+ !defined(JSON_HEDLEY_INTEL_VERSION) && \
487
+ !defined(JSON_HEDLEY_PGI_VERSION) && \
488
+ !defined(JSON_HEDLEY_ARM_VERSION) && \
489
+ !defined(JSON_HEDLEY_CRAY_VERSION) && \
490
+ !defined(JSON_HEDLEY_TI_VERSION) && \
491
+ !defined(JSON_HEDLEY_TI_ARMCL_VERSION) && \
492
+ !defined(JSON_HEDLEY_TI_CL430_VERSION) && \
493
+ !defined(JSON_HEDLEY_TI_CL2000_VERSION) && \
494
+ !defined(JSON_HEDLEY_TI_CL6X_VERSION) && \
495
+ !defined(JSON_HEDLEY_TI_CL7X_VERSION) && \
496
+ !defined(JSON_HEDLEY_TI_CLPRU_VERSION) && \
497
+ !defined(__COMPCERT__) && \
498
+ !defined(JSON_HEDLEY_MCST_LCC_VERSION)
499
+ #define JSON_HEDLEY_GCC_VERSION JSON_HEDLEY_GNUC_VERSION
500
+ #endif
501
+
502
+ #if defined(JSON_HEDLEY_GCC_VERSION_CHECK)
503
+ #undef JSON_HEDLEY_GCC_VERSION_CHECK
504
+ #endif
505
+ #if defined(JSON_HEDLEY_GCC_VERSION)
506
+ #define JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_GCC_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch))
507
+ #else
508
+ #define JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch) (0)
509
+ #endif
510
+
511
+ #if defined(JSON_HEDLEY_HAS_ATTRIBUTE)
512
+ #undef JSON_HEDLEY_HAS_ATTRIBUTE
513
+ #endif
514
+ #if \
515
+ defined(__has_attribute) && \
516
+ ( \
517
+ (!defined(JSON_HEDLEY_IAR_VERSION) || JSON_HEDLEY_IAR_VERSION_CHECK(8,5,9)) \
518
+ )
519
+ # define JSON_HEDLEY_HAS_ATTRIBUTE(attribute) __has_attribute(attribute)
520
+ #else
521
+ # define JSON_HEDLEY_HAS_ATTRIBUTE(attribute) (0)
522
+ #endif
523
+
524
+ #if defined(JSON_HEDLEY_GNUC_HAS_ATTRIBUTE)
525
+ #undef JSON_HEDLEY_GNUC_HAS_ATTRIBUTE
526
+ #endif
527
+ #if defined(__has_attribute)
528
+ #define JSON_HEDLEY_GNUC_HAS_ATTRIBUTE(attribute,major,minor,patch) JSON_HEDLEY_HAS_ATTRIBUTE(attribute)
529
+ #else
530
+ #define JSON_HEDLEY_GNUC_HAS_ATTRIBUTE(attribute,major,minor,patch) JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch)
531
+ #endif
532
+
533
+ #if defined(JSON_HEDLEY_GCC_HAS_ATTRIBUTE)
534
+ #undef JSON_HEDLEY_GCC_HAS_ATTRIBUTE
535
+ #endif
536
+ #if defined(__has_attribute)
537
+ #define JSON_HEDLEY_GCC_HAS_ATTRIBUTE(attribute,major,minor,patch) JSON_HEDLEY_HAS_ATTRIBUTE(attribute)
538
+ #else
539
+ #define JSON_HEDLEY_GCC_HAS_ATTRIBUTE(attribute,major,minor,patch) JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch)
540
+ #endif
541
+
542
+ #if defined(JSON_HEDLEY_HAS_CPP_ATTRIBUTE)
543
+ #undef JSON_HEDLEY_HAS_CPP_ATTRIBUTE
544
+ #endif
545
+ #if \
546
+ defined(__has_cpp_attribute) && \
547
+ defined(__cplusplus) && \
548
+ (!defined(JSON_HEDLEY_SUNPRO_VERSION) || JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,15,0))
549
+ #define JSON_HEDLEY_HAS_CPP_ATTRIBUTE(attribute) __has_cpp_attribute(attribute)
550
+ #else
551
+ #define JSON_HEDLEY_HAS_CPP_ATTRIBUTE(attribute) (0)
552
+ #endif
553
+
554
+ #if defined(JSON_HEDLEY_HAS_CPP_ATTRIBUTE_NS)
555
+ #undef JSON_HEDLEY_HAS_CPP_ATTRIBUTE_NS
556
+ #endif
557
+ #if !defined(__cplusplus) || !defined(__has_cpp_attribute)
558
+ #define JSON_HEDLEY_HAS_CPP_ATTRIBUTE_NS(ns,attribute) (0)
559
+ #elif \
560
+ !defined(JSON_HEDLEY_PGI_VERSION) && \
561
+ !defined(JSON_HEDLEY_IAR_VERSION) && \
562
+ (!defined(JSON_HEDLEY_SUNPRO_VERSION) || JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,15,0)) && \
563
+ (!defined(JSON_HEDLEY_MSVC_VERSION) || JSON_HEDLEY_MSVC_VERSION_CHECK(19,20,0))
564
+ #define JSON_HEDLEY_HAS_CPP_ATTRIBUTE_NS(ns,attribute) JSON_HEDLEY_HAS_CPP_ATTRIBUTE(ns::attribute)
565
+ #else
566
+ #define JSON_HEDLEY_HAS_CPP_ATTRIBUTE_NS(ns,attribute) (0)
567
+ #endif
568
+
569
+ #if defined(JSON_HEDLEY_GNUC_HAS_CPP_ATTRIBUTE)
570
+ #undef JSON_HEDLEY_GNUC_HAS_CPP_ATTRIBUTE
571
+ #endif
572
+ #if defined(__has_cpp_attribute) && defined(__cplusplus)
573
+ #define JSON_HEDLEY_GNUC_HAS_CPP_ATTRIBUTE(attribute,major,minor,patch) __has_cpp_attribute(attribute)
574
+ #else
575
+ #define JSON_HEDLEY_GNUC_HAS_CPP_ATTRIBUTE(attribute,major,minor,patch) JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch)
576
+ #endif
577
+
578
+ #if defined(JSON_HEDLEY_GCC_HAS_CPP_ATTRIBUTE)
579
+ #undef JSON_HEDLEY_GCC_HAS_CPP_ATTRIBUTE
580
+ #endif
581
+ #if defined(__has_cpp_attribute) && defined(__cplusplus)
582
+ #define JSON_HEDLEY_GCC_HAS_CPP_ATTRIBUTE(attribute,major,minor,patch) __has_cpp_attribute(attribute)
583
+ #else
584
+ #define JSON_HEDLEY_GCC_HAS_CPP_ATTRIBUTE(attribute,major,minor,patch) JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch)
585
+ #endif
586
+
587
+ #if defined(JSON_HEDLEY_HAS_BUILTIN)
588
+ #undef JSON_HEDLEY_HAS_BUILTIN
589
+ #endif
590
+ #if defined(__has_builtin)
591
+ #define JSON_HEDLEY_HAS_BUILTIN(builtin) __has_builtin(builtin)
592
+ #else
593
+ #define JSON_HEDLEY_HAS_BUILTIN(builtin) (0)
594
+ #endif
595
+
596
+ #if defined(JSON_HEDLEY_GNUC_HAS_BUILTIN)
597
+ #undef JSON_HEDLEY_GNUC_HAS_BUILTIN
598
+ #endif
599
+ #if defined(__has_builtin)
600
+ #define JSON_HEDLEY_GNUC_HAS_BUILTIN(builtin,major,minor,patch) __has_builtin(builtin)
601
+ #else
602
+ #define JSON_HEDLEY_GNUC_HAS_BUILTIN(builtin,major,minor,patch) JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch)
603
+ #endif
604
+
605
+ #if defined(JSON_HEDLEY_GCC_HAS_BUILTIN)
606
+ #undef JSON_HEDLEY_GCC_HAS_BUILTIN
607
+ #endif
608
+ #if defined(__has_builtin)
609
+ #define JSON_HEDLEY_GCC_HAS_BUILTIN(builtin,major,minor,patch) __has_builtin(builtin)
610
+ #else
611
+ #define JSON_HEDLEY_GCC_HAS_BUILTIN(builtin,major,minor,patch) JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch)
612
+ #endif
613
+
614
+ #if defined(JSON_HEDLEY_HAS_FEATURE)
615
+ #undef JSON_HEDLEY_HAS_FEATURE
616
+ #endif
617
+ #if defined(__has_feature)
618
+ #define JSON_HEDLEY_HAS_FEATURE(feature) __has_feature(feature)
619
+ #else
620
+ #define JSON_HEDLEY_HAS_FEATURE(feature) (0)
621
+ #endif
622
+
623
+ #if defined(JSON_HEDLEY_GNUC_HAS_FEATURE)
624
+ #undef JSON_HEDLEY_GNUC_HAS_FEATURE
625
+ #endif
626
+ #if defined(__has_feature)
627
+ #define JSON_HEDLEY_GNUC_HAS_FEATURE(feature,major,minor,patch) __has_feature(feature)
628
+ #else
629
+ #define JSON_HEDLEY_GNUC_HAS_FEATURE(feature,major,minor,patch) JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch)
630
+ #endif
631
+
632
+ #if defined(JSON_HEDLEY_GCC_HAS_FEATURE)
633
+ #undef JSON_HEDLEY_GCC_HAS_FEATURE
634
+ #endif
635
+ #if defined(__has_feature)
636
+ #define JSON_HEDLEY_GCC_HAS_FEATURE(feature,major,minor,patch) __has_feature(feature)
637
+ #else
638
+ #define JSON_HEDLEY_GCC_HAS_FEATURE(feature,major,minor,patch) JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch)
639
+ #endif
640
+
641
+ #if defined(JSON_HEDLEY_HAS_EXTENSION)
642
+ #undef JSON_HEDLEY_HAS_EXTENSION
643
+ #endif
644
+ #if defined(__has_extension)
645
+ #define JSON_HEDLEY_HAS_EXTENSION(extension) __has_extension(extension)
646
+ #else
647
+ #define JSON_HEDLEY_HAS_EXTENSION(extension) (0)
648
+ #endif
649
+
650
+ #if defined(JSON_HEDLEY_GNUC_HAS_EXTENSION)
651
+ #undef JSON_HEDLEY_GNUC_HAS_EXTENSION
652
+ #endif
653
+ #if defined(__has_extension)
654
+ #define JSON_HEDLEY_GNUC_HAS_EXTENSION(extension,major,minor,patch) __has_extension(extension)
655
+ #else
656
+ #define JSON_HEDLEY_GNUC_HAS_EXTENSION(extension,major,minor,patch) JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch)
657
+ #endif
658
+
659
+ #if defined(JSON_HEDLEY_GCC_HAS_EXTENSION)
660
+ #undef JSON_HEDLEY_GCC_HAS_EXTENSION
661
+ #endif
662
+ #if defined(__has_extension)
663
+ #define JSON_HEDLEY_GCC_HAS_EXTENSION(extension,major,minor,patch) __has_extension(extension)
664
+ #else
665
+ #define JSON_HEDLEY_GCC_HAS_EXTENSION(extension,major,minor,patch) JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch)
666
+ #endif
667
+
668
+ #if defined(JSON_HEDLEY_HAS_DECLSPEC_ATTRIBUTE)
669
+ #undef JSON_HEDLEY_HAS_DECLSPEC_ATTRIBUTE
670
+ #endif
671
+ #if defined(__has_declspec_attribute)
672
+ #define JSON_HEDLEY_HAS_DECLSPEC_ATTRIBUTE(attribute) __has_declspec_attribute(attribute)
673
+ #else
674
+ #define JSON_HEDLEY_HAS_DECLSPEC_ATTRIBUTE(attribute) (0)
675
+ #endif
676
+
677
+ #if defined(JSON_HEDLEY_GNUC_HAS_DECLSPEC_ATTRIBUTE)
678
+ #undef JSON_HEDLEY_GNUC_HAS_DECLSPEC_ATTRIBUTE
679
+ #endif
680
+ #if defined(__has_declspec_attribute)
681
+ #define JSON_HEDLEY_GNUC_HAS_DECLSPEC_ATTRIBUTE(attribute,major,minor,patch) __has_declspec_attribute(attribute)
682
+ #else
683
+ #define JSON_HEDLEY_GNUC_HAS_DECLSPEC_ATTRIBUTE(attribute,major,minor,patch) JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch)
684
+ #endif
685
+
686
+ #if defined(JSON_HEDLEY_GCC_HAS_DECLSPEC_ATTRIBUTE)
687
+ #undef JSON_HEDLEY_GCC_HAS_DECLSPEC_ATTRIBUTE
688
+ #endif
689
+ #if defined(__has_declspec_attribute)
690
+ #define JSON_HEDLEY_GCC_HAS_DECLSPEC_ATTRIBUTE(attribute,major,minor,patch) __has_declspec_attribute(attribute)
691
+ #else
692
+ #define JSON_HEDLEY_GCC_HAS_DECLSPEC_ATTRIBUTE(attribute,major,minor,patch) JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch)
693
+ #endif
694
+
695
+ #if defined(JSON_HEDLEY_HAS_WARNING)
696
+ #undef JSON_HEDLEY_HAS_WARNING
697
+ #endif
698
+ #if defined(__has_warning)
699
+ #define JSON_HEDLEY_HAS_WARNING(warning) __has_warning(warning)
700
+ #else
701
+ #define JSON_HEDLEY_HAS_WARNING(warning) (0)
702
+ #endif
703
+
704
+ #if defined(JSON_HEDLEY_GNUC_HAS_WARNING)
705
+ #undef JSON_HEDLEY_GNUC_HAS_WARNING
706
+ #endif
707
+ #if defined(__has_warning)
708
+ #define JSON_HEDLEY_GNUC_HAS_WARNING(warning,major,minor,patch) __has_warning(warning)
709
+ #else
710
+ #define JSON_HEDLEY_GNUC_HAS_WARNING(warning,major,minor,patch) JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch)
711
+ #endif
712
+
713
+ #if defined(JSON_HEDLEY_GCC_HAS_WARNING)
714
+ #undef JSON_HEDLEY_GCC_HAS_WARNING
715
+ #endif
716
+ #if defined(__has_warning)
717
+ #define JSON_HEDLEY_GCC_HAS_WARNING(warning,major,minor,patch) __has_warning(warning)
718
+ #else
719
+ #define JSON_HEDLEY_GCC_HAS_WARNING(warning,major,minor,patch) JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch)
720
+ #endif
721
+
722
+ #if \
723
+ (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)) || \
724
+ defined(__clang__) || \
725
+ JSON_HEDLEY_GCC_VERSION_CHECK(3,0,0) || \
726
+ JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \
727
+ JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0) || \
728
+ JSON_HEDLEY_PGI_VERSION_CHECK(18,4,0) || \
729
+ JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \
730
+ JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \
731
+ JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,7,0) || \
732
+ JSON_HEDLEY_TI_CL430_VERSION_CHECK(2,0,1) || \
733
+ JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,1,0) || \
734
+ JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,0,0) || \
735
+ JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \
736
+ JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) || \
737
+ JSON_HEDLEY_CRAY_VERSION_CHECK(5,0,0) || \
738
+ JSON_HEDLEY_TINYC_VERSION_CHECK(0,9,17) || \
739
+ JSON_HEDLEY_SUNPRO_VERSION_CHECK(8,0,0) || \
740
+ (JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0) && defined(__C99_PRAGMA_OPERATOR))
741
+ #define JSON_HEDLEY_PRAGMA(value) _Pragma(#value)
742
+ #elif JSON_HEDLEY_MSVC_VERSION_CHECK(15,0,0)
743
+ #define JSON_HEDLEY_PRAGMA(value) __pragma(value)
744
+ #else
745
+ #define JSON_HEDLEY_PRAGMA(value)
746
+ #endif
747
+
748
+ #if defined(JSON_HEDLEY_DIAGNOSTIC_PUSH)
749
+ #undef JSON_HEDLEY_DIAGNOSTIC_PUSH
750
+ #endif
751
+ #if defined(JSON_HEDLEY_DIAGNOSTIC_POP)
752
+ #undef JSON_HEDLEY_DIAGNOSTIC_POP
753
+ #endif
754
+ #if defined(__clang__)
755
+ #define JSON_HEDLEY_DIAGNOSTIC_PUSH _Pragma("clang diagnostic push")
756
+ #define JSON_HEDLEY_DIAGNOSTIC_POP _Pragma("clang diagnostic pop")
757
+ #elif JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0)
758
+ #define JSON_HEDLEY_DIAGNOSTIC_PUSH _Pragma("warning(push)")
759
+ #define JSON_HEDLEY_DIAGNOSTIC_POP _Pragma("warning(pop)")
760
+ #elif JSON_HEDLEY_GCC_VERSION_CHECK(4,6,0)
761
+ #define JSON_HEDLEY_DIAGNOSTIC_PUSH _Pragma("GCC diagnostic push")
762
+ #define JSON_HEDLEY_DIAGNOSTIC_POP _Pragma("GCC diagnostic pop")
763
+ #elif \
764
+ JSON_HEDLEY_MSVC_VERSION_CHECK(15,0,0) || \
765
+ JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0)
766
+ #define JSON_HEDLEY_DIAGNOSTIC_PUSH __pragma(warning(push))
767
+ #define JSON_HEDLEY_DIAGNOSTIC_POP __pragma(warning(pop))
768
+ #elif JSON_HEDLEY_ARM_VERSION_CHECK(5,6,0)
769
+ #define JSON_HEDLEY_DIAGNOSTIC_PUSH _Pragma("push")
770
+ #define JSON_HEDLEY_DIAGNOSTIC_POP _Pragma("pop")
771
+ #elif \
772
+ JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \
773
+ JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \
774
+ JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,4,0) || \
775
+ JSON_HEDLEY_TI_CL6X_VERSION_CHECK(8,1,0) || \
776
+ JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \
777
+ JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0)
778
+ #define JSON_HEDLEY_DIAGNOSTIC_PUSH _Pragma("diag_push")
779
+ #define JSON_HEDLEY_DIAGNOSTIC_POP _Pragma("diag_pop")
780
+ #elif JSON_HEDLEY_PELLES_VERSION_CHECK(2,90,0)
781
+ #define JSON_HEDLEY_DIAGNOSTIC_PUSH _Pragma("warning(push)")
782
+ #define JSON_HEDLEY_DIAGNOSTIC_POP _Pragma("warning(pop)")
783
+ #else
784
+ #define JSON_HEDLEY_DIAGNOSTIC_PUSH
785
+ #define JSON_HEDLEY_DIAGNOSTIC_POP
786
+ #endif
787
+
788
+ /* JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_ is for
789
+ HEDLEY INTERNAL USE ONLY. API subject to change without notice. */
790
+ #if defined(JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_)
791
+ #undef JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_
792
+ #endif
793
+ #if defined(__cplusplus)
794
+ # if JSON_HEDLEY_HAS_WARNING("-Wc++98-compat")
795
+ # if JSON_HEDLEY_HAS_WARNING("-Wc++17-extensions")
796
+ # if JSON_HEDLEY_HAS_WARNING("-Wc++1z-extensions")
797
+ # define JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_(xpr) \
798
+ JSON_HEDLEY_DIAGNOSTIC_PUSH \
799
+ _Pragma("clang diagnostic ignored \"-Wc++98-compat\"") \
800
+ _Pragma("clang diagnostic ignored \"-Wc++17-extensions\"") \
801
+ _Pragma("clang diagnostic ignored \"-Wc++1z-extensions\"") \
802
+ xpr \
803
+ JSON_HEDLEY_DIAGNOSTIC_POP
804
+ # else
805
+ # define JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_(xpr) \
806
+ JSON_HEDLEY_DIAGNOSTIC_PUSH \
807
+ _Pragma("clang diagnostic ignored \"-Wc++98-compat\"") \
808
+ _Pragma("clang diagnostic ignored \"-Wc++17-extensions\"") \
809
+ xpr \
810
+ JSON_HEDLEY_DIAGNOSTIC_POP
811
+ # endif
812
+ # else
813
+ # define JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_(xpr) \
814
+ JSON_HEDLEY_DIAGNOSTIC_PUSH \
815
+ _Pragma("clang diagnostic ignored \"-Wc++98-compat\"") \
816
+ xpr \
817
+ JSON_HEDLEY_DIAGNOSTIC_POP
818
+ # endif
819
+ # endif
820
+ #endif
821
+ #if !defined(JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_)
822
+ #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_(x) x
823
+ #endif
824
+
825
+ #if defined(JSON_HEDLEY_CONST_CAST)
826
+ #undef JSON_HEDLEY_CONST_CAST
827
+ #endif
828
+ #if defined(__cplusplus)
829
+ # define JSON_HEDLEY_CONST_CAST(T, expr) (const_cast<T>(expr))
830
+ #elif \
831
+ JSON_HEDLEY_HAS_WARNING("-Wcast-qual") || \
832
+ JSON_HEDLEY_GCC_VERSION_CHECK(4,6,0) || \
833
+ JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0)
834
+ # define JSON_HEDLEY_CONST_CAST(T, expr) (__extension__ ({ \
835
+ JSON_HEDLEY_DIAGNOSTIC_PUSH \
836
+ JSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL \
837
+ ((T) (expr)); \
838
+ JSON_HEDLEY_DIAGNOSTIC_POP \
839
+ }))
840
+ #else
841
+ # define JSON_HEDLEY_CONST_CAST(T, expr) ((T) (expr))
842
+ #endif
843
+
844
+ #if defined(JSON_HEDLEY_REINTERPRET_CAST)
845
+ #undef JSON_HEDLEY_REINTERPRET_CAST
846
+ #endif
847
+ #if defined(__cplusplus)
848
+ #define JSON_HEDLEY_REINTERPRET_CAST(T, expr) (reinterpret_cast<T>(expr))
849
+ #else
850
+ #define JSON_HEDLEY_REINTERPRET_CAST(T, expr) ((T) (expr))
851
+ #endif
852
+
853
+ #if defined(JSON_HEDLEY_STATIC_CAST)
854
+ #undef JSON_HEDLEY_STATIC_CAST
855
+ #endif
856
+ #if defined(__cplusplus)
857
+ #define JSON_HEDLEY_STATIC_CAST(T, expr) (static_cast<T>(expr))
858
+ #else
859
+ #define JSON_HEDLEY_STATIC_CAST(T, expr) ((T) (expr))
860
+ #endif
861
+
862
+ #if defined(JSON_HEDLEY_CPP_CAST)
863
+ #undef JSON_HEDLEY_CPP_CAST
864
+ #endif
865
+ #if defined(__cplusplus)
866
+ # if JSON_HEDLEY_HAS_WARNING("-Wold-style-cast")
867
+ # define JSON_HEDLEY_CPP_CAST(T, expr) \
868
+ JSON_HEDLEY_DIAGNOSTIC_PUSH \
869
+ _Pragma("clang diagnostic ignored \"-Wold-style-cast\"") \
870
+ ((T) (expr)) \
871
+ JSON_HEDLEY_DIAGNOSTIC_POP
872
+ # elif JSON_HEDLEY_IAR_VERSION_CHECK(8,3,0)
873
+ # define JSON_HEDLEY_CPP_CAST(T, expr) \
874
+ JSON_HEDLEY_DIAGNOSTIC_PUSH \
875
+ _Pragma("diag_suppress=Pe137") \
876
+ JSON_HEDLEY_DIAGNOSTIC_POP
877
+ # else
878
+ # define JSON_HEDLEY_CPP_CAST(T, expr) ((T) (expr))
879
+ # endif
880
+ #else
881
+ # define JSON_HEDLEY_CPP_CAST(T, expr) (expr)
882
+ #endif
883
+
884
+ #if defined(JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED)
885
+ #undef JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED
886
+ #endif
887
+ #if JSON_HEDLEY_HAS_WARNING("-Wdeprecated-declarations")
888
+ #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("clang diagnostic ignored \"-Wdeprecated-declarations\"")
889
+ #elif JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0)
890
+ #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("warning(disable:1478 1786)")
891
+ #elif JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0)
892
+ #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED __pragma(warning(disable:1478 1786))
893
+ #elif JSON_HEDLEY_PGI_VERSION_CHECK(20,7,0)
894
+ #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("diag_suppress 1215,1216,1444,1445")
895
+ #elif JSON_HEDLEY_PGI_VERSION_CHECK(17,10,0)
896
+ #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("diag_suppress 1215,1444")
897
+ #elif JSON_HEDLEY_GCC_VERSION_CHECK(4,3,0)
898
+ #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"")
899
+ #elif JSON_HEDLEY_MSVC_VERSION_CHECK(15,0,0)
900
+ #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED __pragma(warning(disable:4996))
901
+ #elif JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10)
902
+ #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("diag_suppress 1215,1444")
903
+ #elif \
904
+ JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \
905
+ (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \
906
+ JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \
907
+ (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \
908
+ JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \
909
+ (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \
910
+ JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \
911
+ (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \
912
+ JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) || \
913
+ JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \
914
+ JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0)
915
+ #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("diag_suppress 1291,1718")
916
+ #elif JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,13,0) && !defined(__cplusplus)
917
+ #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("error_messages(off,E_DEPRECATED_ATT,E_DEPRECATED_ATT_MESS)")
918
+ #elif JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,13,0) && defined(__cplusplus)
919
+ #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("error_messages(off,symdeprecated,symdeprecated2)")
920
+ #elif JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0)
921
+ #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("diag_suppress=Pe1444,Pe1215")
922
+ #elif JSON_HEDLEY_PELLES_VERSION_CHECK(2,90,0)
923
+ #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("warn(disable:2241)")
924
+ #else
925
+ #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED
926
+ #endif
927
+
928
+ #if defined(JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS)
929
+ #undef JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS
930
+ #endif
931
+ #if JSON_HEDLEY_HAS_WARNING("-Wunknown-pragmas")
932
+ #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma("clang diagnostic ignored \"-Wunknown-pragmas\"")
933
+ #elif JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0)
934
+ #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma("warning(disable:161)")
935
+ #elif JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0)
936
+ #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS __pragma(warning(disable:161))
937
+ #elif JSON_HEDLEY_PGI_VERSION_CHECK(17,10,0)
938
+ #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma("diag_suppress 1675")
939
+ #elif JSON_HEDLEY_GCC_VERSION_CHECK(4,3,0)
940
+ #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma("GCC diagnostic ignored \"-Wunknown-pragmas\"")
941
+ #elif JSON_HEDLEY_MSVC_VERSION_CHECK(15,0,0)
942
+ #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS __pragma(warning(disable:4068))
943
+ #elif \
944
+ JSON_HEDLEY_TI_VERSION_CHECK(16,9,0) || \
945
+ JSON_HEDLEY_TI_CL6X_VERSION_CHECK(8,0,0) || \
946
+ JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \
947
+ JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,3,0)
948
+ #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma("diag_suppress 163")
949
+ #elif JSON_HEDLEY_TI_CL6X_VERSION_CHECK(8,0,0)
950
+ #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma("diag_suppress 163")
951
+ #elif JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0)
952
+ #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma("diag_suppress=Pe161")
953
+ #elif JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10)
954
+ #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma("diag_suppress 161")
955
+ #else
956
+ #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS
957
+ #endif
958
+
959
+ #if defined(JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES)
960
+ #undef JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES
961
+ #endif
962
+ #if JSON_HEDLEY_HAS_WARNING("-Wunknown-attributes")
963
+ #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma("clang diagnostic ignored \"-Wunknown-attributes\"")
964
+ #elif JSON_HEDLEY_GCC_VERSION_CHECK(4,6,0)
965
+ #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"")
966
+ #elif JSON_HEDLEY_INTEL_VERSION_CHECK(17,0,0)
967
+ #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma("warning(disable:1292)")
968
+ #elif JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0)
969
+ #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES __pragma(warning(disable:1292))
970
+ #elif JSON_HEDLEY_MSVC_VERSION_CHECK(19,0,0)
971
+ #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES __pragma(warning(disable:5030))
972
+ #elif JSON_HEDLEY_PGI_VERSION_CHECK(20,7,0)
973
+ #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma("diag_suppress 1097,1098")
974
+ #elif JSON_HEDLEY_PGI_VERSION_CHECK(17,10,0)
975
+ #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma("diag_suppress 1097")
976
+ #elif JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,14,0) && defined(__cplusplus)
977
+ #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma("error_messages(off,attrskipunsup)")
978
+ #elif \
979
+ JSON_HEDLEY_TI_VERSION_CHECK(18,1,0) || \
980
+ JSON_HEDLEY_TI_CL6X_VERSION_CHECK(8,3,0) || \
981
+ JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0)
982
+ #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma("diag_suppress 1173")
983
+ #elif JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0)
984
+ #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma("diag_suppress=Pe1097")
985
+ #elif JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10)
986
+ #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma("diag_suppress 1097")
987
+ #else
988
+ #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES
989
+ #endif
990
+
991
+ #if defined(JSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL)
992
+ #undef JSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL
993
+ #endif
994
+ #if JSON_HEDLEY_HAS_WARNING("-Wcast-qual")
995
+ #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL _Pragma("clang diagnostic ignored \"-Wcast-qual\"")
996
+ #elif JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0)
997
+ #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL _Pragma("warning(disable:2203 2331)")
998
+ #elif JSON_HEDLEY_GCC_VERSION_CHECK(3,0,0)
999
+ #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL _Pragma("GCC diagnostic ignored \"-Wcast-qual\"")
1000
+ #else
1001
+ #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL
1002
+ #endif
1003
+
1004
+ #if defined(JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNUSED_FUNCTION)
1005
+ #undef JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNUSED_FUNCTION
1006
+ #endif
1007
+ #if JSON_HEDLEY_HAS_WARNING("-Wunused-function")
1008
+ #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNUSED_FUNCTION _Pragma("clang diagnostic ignored \"-Wunused-function\"")
1009
+ #elif JSON_HEDLEY_GCC_VERSION_CHECK(3,4,0)
1010
+ #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNUSED_FUNCTION _Pragma("GCC diagnostic ignored \"-Wunused-function\"")
1011
+ #elif JSON_HEDLEY_MSVC_VERSION_CHECK(1,0,0)
1012
+ #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNUSED_FUNCTION __pragma(warning(disable:4505))
1013
+ #elif JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10)
1014
+ #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNUSED_FUNCTION _Pragma("diag_suppress 3142")
1015
+ #else
1016
+ #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNUSED_FUNCTION
1017
+ #endif
1018
+
1019
+ #if defined(JSON_HEDLEY_DEPRECATED)
1020
+ #undef JSON_HEDLEY_DEPRECATED
1021
+ #endif
1022
+ #if defined(JSON_HEDLEY_DEPRECATED_FOR)
1023
+ #undef JSON_HEDLEY_DEPRECATED_FOR
1024
+ #endif
1025
+ #if \
1026
+ JSON_HEDLEY_MSVC_VERSION_CHECK(14,0,0) || \
1027
+ JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0)
1028
+ #define JSON_HEDLEY_DEPRECATED(since) __declspec(deprecated("Since " # since))
1029
+ #define JSON_HEDLEY_DEPRECATED_FOR(since, replacement) __declspec(deprecated("Since " #since "; use " #replacement))
1030
+ #elif \
1031
+ (JSON_HEDLEY_HAS_EXTENSION(attribute_deprecated_with_message) && !defined(JSON_HEDLEY_IAR_VERSION)) || \
1032
+ JSON_HEDLEY_GCC_VERSION_CHECK(4,5,0) || \
1033
+ JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \
1034
+ JSON_HEDLEY_ARM_VERSION_CHECK(5,6,0) || \
1035
+ JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,13,0) || \
1036
+ JSON_HEDLEY_PGI_VERSION_CHECK(17,10,0) || \
1037
+ JSON_HEDLEY_TI_VERSION_CHECK(18,1,0) || \
1038
+ JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(18,1,0) || \
1039
+ JSON_HEDLEY_TI_CL6X_VERSION_CHECK(8,3,0) || \
1040
+ JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \
1041
+ JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,3,0) || \
1042
+ JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10)
1043
+ #define JSON_HEDLEY_DEPRECATED(since) __attribute__((__deprecated__("Since " #since)))
1044
+ #define JSON_HEDLEY_DEPRECATED_FOR(since, replacement) __attribute__((__deprecated__("Since " #since "; use " #replacement)))
1045
+ #elif defined(__cplusplus) && (__cplusplus >= 201402L)
1046
+ #define JSON_HEDLEY_DEPRECATED(since) JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[deprecated("Since " #since)]])
1047
+ #define JSON_HEDLEY_DEPRECATED_FOR(since, replacement) JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[deprecated("Since " #since "; use " #replacement)]])
1048
+ #elif \
1049
+ JSON_HEDLEY_HAS_ATTRIBUTE(deprecated) || \
1050
+ JSON_HEDLEY_GCC_VERSION_CHECK(3,1,0) || \
1051
+ JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \
1052
+ JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \
1053
+ (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \
1054
+ JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \
1055
+ (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \
1056
+ JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \
1057
+ (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \
1058
+ JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \
1059
+ (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \
1060
+ JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) || \
1061
+ JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \
1062
+ JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) || \
1063
+ JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) || \
1064
+ JSON_HEDLEY_IAR_VERSION_CHECK(8,10,0)
1065
+ #define JSON_HEDLEY_DEPRECATED(since) __attribute__((__deprecated__))
1066
+ #define JSON_HEDLEY_DEPRECATED_FOR(since, replacement) __attribute__((__deprecated__))
1067
+ #elif \
1068
+ JSON_HEDLEY_MSVC_VERSION_CHECK(13,10,0) || \
1069
+ JSON_HEDLEY_PELLES_VERSION_CHECK(6,50,0) || \
1070
+ JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0)
1071
+ #define JSON_HEDLEY_DEPRECATED(since) __declspec(deprecated)
1072
+ #define JSON_HEDLEY_DEPRECATED_FOR(since, replacement) __declspec(deprecated)
1073
+ #elif JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0)
1074
+ #define JSON_HEDLEY_DEPRECATED(since) _Pragma("deprecated")
1075
+ #define JSON_HEDLEY_DEPRECATED_FOR(since, replacement) _Pragma("deprecated")
1076
+ #else
1077
+ #define JSON_HEDLEY_DEPRECATED(since)
1078
+ #define JSON_HEDLEY_DEPRECATED_FOR(since, replacement)
1079
+ #endif
1080
+
1081
+ #if defined(JSON_HEDLEY_UNAVAILABLE)
1082
+ #undef JSON_HEDLEY_UNAVAILABLE
1083
+ #endif
1084
+ #if \
1085
+ JSON_HEDLEY_HAS_ATTRIBUTE(warning) || \
1086
+ JSON_HEDLEY_GCC_VERSION_CHECK(4,3,0) || \
1087
+ JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \
1088
+ JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10)
1089
+ #define JSON_HEDLEY_UNAVAILABLE(available_since) __attribute__((__warning__("Not available until " #available_since)))
1090
+ #else
1091
+ #define JSON_HEDLEY_UNAVAILABLE(available_since)
1092
+ #endif
1093
+
1094
+ #if defined(JSON_HEDLEY_WARN_UNUSED_RESULT)
1095
+ #undef JSON_HEDLEY_WARN_UNUSED_RESULT
1096
+ #endif
1097
+ #if defined(JSON_HEDLEY_WARN_UNUSED_RESULT_MSG)
1098
+ #undef JSON_HEDLEY_WARN_UNUSED_RESULT_MSG
1099
+ #endif
1100
+ #if \
1101
+ JSON_HEDLEY_HAS_ATTRIBUTE(warn_unused_result) || \
1102
+ JSON_HEDLEY_GCC_VERSION_CHECK(3,4,0) || \
1103
+ JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \
1104
+ JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \
1105
+ (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \
1106
+ JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \
1107
+ (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \
1108
+ JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \
1109
+ (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \
1110
+ JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \
1111
+ (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \
1112
+ JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) || \
1113
+ JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \
1114
+ JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) || \
1115
+ (JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,15,0) && defined(__cplusplus)) || \
1116
+ JSON_HEDLEY_PGI_VERSION_CHECK(17,10,0) || \
1117
+ JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10)
1118
+ #define JSON_HEDLEY_WARN_UNUSED_RESULT __attribute__((__warn_unused_result__))
1119
+ #define JSON_HEDLEY_WARN_UNUSED_RESULT_MSG(msg) __attribute__((__warn_unused_result__))
1120
+ #elif (JSON_HEDLEY_HAS_CPP_ATTRIBUTE(nodiscard) >= 201907L)
1121
+ #define JSON_HEDLEY_WARN_UNUSED_RESULT JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[nodiscard]])
1122
+ #define JSON_HEDLEY_WARN_UNUSED_RESULT_MSG(msg) JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[nodiscard(msg)]])
1123
+ #elif JSON_HEDLEY_HAS_CPP_ATTRIBUTE(nodiscard)
1124
+ #define JSON_HEDLEY_WARN_UNUSED_RESULT JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[nodiscard]])
1125
+ #define JSON_HEDLEY_WARN_UNUSED_RESULT_MSG(msg) JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[nodiscard]])
1126
+ #elif defined(_Check_return_) /* SAL */
1127
+ #define JSON_HEDLEY_WARN_UNUSED_RESULT _Check_return_
1128
+ #define JSON_HEDLEY_WARN_UNUSED_RESULT_MSG(msg) _Check_return_
1129
+ #else
1130
+ #define JSON_HEDLEY_WARN_UNUSED_RESULT
1131
+ #define JSON_HEDLEY_WARN_UNUSED_RESULT_MSG(msg)
1132
+ #endif
1133
+
1134
+ #if defined(JSON_HEDLEY_SENTINEL)
1135
+ #undef JSON_HEDLEY_SENTINEL
1136
+ #endif
1137
+ #if \
1138
+ JSON_HEDLEY_HAS_ATTRIBUTE(sentinel) || \
1139
+ JSON_HEDLEY_GCC_VERSION_CHECK(4,0,0) || \
1140
+ JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \
1141
+ JSON_HEDLEY_ARM_VERSION_CHECK(5,4,0) || \
1142
+ JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10)
1143
+ #define JSON_HEDLEY_SENTINEL(position) __attribute__((__sentinel__(position)))
1144
+ #else
1145
+ #define JSON_HEDLEY_SENTINEL(position)
1146
+ #endif
1147
+
1148
+ #if defined(JSON_HEDLEY_NO_RETURN)
1149
+ #undef JSON_HEDLEY_NO_RETURN
1150
+ #endif
1151
+ #if JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0)
1152
+ #define JSON_HEDLEY_NO_RETURN __noreturn
1153
+ #elif \
1154
+ JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \
1155
+ JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10)
1156
+ #define JSON_HEDLEY_NO_RETURN __attribute__((__noreturn__))
1157
+ #elif defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L
1158
+ #define JSON_HEDLEY_NO_RETURN _Noreturn
1159
+ #elif defined(__cplusplus) && (__cplusplus >= 201103L)
1160
+ #define JSON_HEDLEY_NO_RETURN JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[noreturn]])
1161
+ #elif \
1162
+ JSON_HEDLEY_HAS_ATTRIBUTE(noreturn) || \
1163
+ JSON_HEDLEY_GCC_VERSION_CHECK(3,2,0) || \
1164
+ JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,11,0) || \
1165
+ JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \
1166
+ JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0) || \
1167
+ JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \
1168
+ (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \
1169
+ JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \
1170
+ (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \
1171
+ JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \
1172
+ (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \
1173
+ JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \
1174
+ (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \
1175
+ JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) || \
1176
+ JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \
1177
+ JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) || \
1178
+ JSON_HEDLEY_IAR_VERSION_CHECK(8,10,0)
1179
+ #define JSON_HEDLEY_NO_RETURN __attribute__((__noreturn__))
1180
+ #elif JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,10,0)
1181
+ #define JSON_HEDLEY_NO_RETURN _Pragma("does_not_return")
1182
+ #elif \
1183
+ JSON_HEDLEY_MSVC_VERSION_CHECK(13,10,0) || \
1184
+ JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0)
1185
+ #define JSON_HEDLEY_NO_RETURN __declspec(noreturn)
1186
+ #elif JSON_HEDLEY_TI_CL6X_VERSION_CHECK(6,0,0) && defined(__cplusplus)
1187
+ #define JSON_HEDLEY_NO_RETURN _Pragma("FUNC_NEVER_RETURNS;")
1188
+ #elif JSON_HEDLEY_COMPCERT_VERSION_CHECK(3,2,0)
1189
+ #define JSON_HEDLEY_NO_RETURN __attribute((noreturn))
1190
+ #elif JSON_HEDLEY_PELLES_VERSION_CHECK(9,0,0)
1191
+ #define JSON_HEDLEY_NO_RETURN __declspec(noreturn)
1192
+ #else
1193
+ #define JSON_HEDLEY_NO_RETURN
1194
+ #endif
1195
+
1196
+ #if defined(JSON_HEDLEY_NO_ESCAPE)
1197
+ #undef JSON_HEDLEY_NO_ESCAPE
1198
+ #endif
1199
+ #if JSON_HEDLEY_HAS_ATTRIBUTE(noescape)
1200
+ #define JSON_HEDLEY_NO_ESCAPE __attribute__((__noescape__))
1201
+ #else
1202
+ #define JSON_HEDLEY_NO_ESCAPE
1203
+ #endif
1204
+
1205
+ #if defined(JSON_HEDLEY_UNREACHABLE)
1206
+ #undef JSON_HEDLEY_UNREACHABLE
1207
+ #endif
1208
+ #if defined(JSON_HEDLEY_UNREACHABLE_RETURN)
1209
+ #undef JSON_HEDLEY_UNREACHABLE_RETURN
1210
+ #endif
1211
+ #if defined(JSON_HEDLEY_ASSUME)
1212
+ #undef JSON_HEDLEY_ASSUME
1213
+ #endif
1214
+ #if \
1215
+ JSON_HEDLEY_MSVC_VERSION_CHECK(13,10,0) || \
1216
+ JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \
1217
+ JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0)
1218
+ #define JSON_HEDLEY_ASSUME(expr) __assume(expr)
1219
+ #elif JSON_HEDLEY_HAS_BUILTIN(__builtin_assume)
1220
+ #define JSON_HEDLEY_ASSUME(expr) __builtin_assume(expr)
1221
+ #elif \
1222
+ JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,2,0) || \
1223
+ JSON_HEDLEY_TI_CL6X_VERSION_CHECK(4,0,0)
1224
+ #if defined(__cplusplus)
1225
+ #define JSON_HEDLEY_ASSUME(expr) std::_nassert(expr)
1226
+ #else
1227
+ #define JSON_HEDLEY_ASSUME(expr) _nassert(expr)
1228
+ #endif
1229
+ #endif
1230
+ #if \
1231
+ (JSON_HEDLEY_HAS_BUILTIN(__builtin_unreachable) && (!defined(JSON_HEDLEY_ARM_VERSION))) || \
1232
+ JSON_HEDLEY_GCC_VERSION_CHECK(4,5,0) || \
1233
+ JSON_HEDLEY_PGI_VERSION_CHECK(18,10,0) || \
1234
+ JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \
1235
+ JSON_HEDLEY_IBM_VERSION_CHECK(13,1,5) || \
1236
+ JSON_HEDLEY_CRAY_VERSION_CHECK(10,0,0) || \
1237
+ JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10)
1238
+ #define JSON_HEDLEY_UNREACHABLE() __builtin_unreachable()
1239
+ #elif defined(JSON_HEDLEY_ASSUME)
1240
+ #define JSON_HEDLEY_UNREACHABLE() JSON_HEDLEY_ASSUME(0)
1241
+ #endif
1242
+ #if !defined(JSON_HEDLEY_ASSUME)
1243
+ #if defined(JSON_HEDLEY_UNREACHABLE)
1244
+ #define JSON_HEDLEY_ASSUME(expr) JSON_HEDLEY_STATIC_CAST(void, ((expr) ? 1 : (JSON_HEDLEY_UNREACHABLE(), 1)))
1245
+ #else
1246
+ #define JSON_HEDLEY_ASSUME(expr) JSON_HEDLEY_STATIC_CAST(void, expr)
1247
+ #endif
1248
+ #endif
1249
+ #if defined(JSON_HEDLEY_UNREACHABLE)
1250
+ #if \
1251
+ JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,2,0) || \
1252
+ JSON_HEDLEY_TI_CL6X_VERSION_CHECK(4,0,0)
1253
+ #define JSON_HEDLEY_UNREACHABLE_RETURN(value) return (JSON_HEDLEY_STATIC_CAST(void, JSON_HEDLEY_ASSUME(0)), (value))
1254
+ #else
1255
+ #define JSON_HEDLEY_UNREACHABLE_RETURN(value) JSON_HEDLEY_UNREACHABLE()
1256
+ #endif
1257
+ #else
1258
+ #define JSON_HEDLEY_UNREACHABLE_RETURN(value) return (value)
1259
+ #endif
1260
+ #if !defined(JSON_HEDLEY_UNREACHABLE)
1261
+ #define JSON_HEDLEY_UNREACHABLE() JSON_HEDLEY_ASSUME(0)
1262
+ #endif
1263
+
1264
+ JSON_HEDLEY_DIAGNOSTIC_PUSH
1265
+ #if JSON_HEDLEY_HAS_WARNING("-Wpedantic")
1266
+ #pragma clang diagnostic ignored "-Wpedantic"
1267
+ #endif
1268
+ #if JSON_HEDLEY_HAS_WARNING("-Wc++98-compat-pedantic") && defined(__cplusplus)
1269
+ #pragma clang diagnostic ignored "-Wc++98-compat-pedantic"
1270
+ #endif
1271
+ #if JSON_HEDLEY_GCC_HAS_WARNING("-Wvariadic-macros",4,0,0)
1272
+ #if defined(__clang__)
1273
+ #pragma clang diagnostic ignored "-Wvariadic-macros"
1274
+ #elif defined(JSON_HEDLEY_GCC_VERSION)
1275
+ #pragma GCC diagnostic ignored "-Wvariadic-macros"
1276
+ #endif
1277
+ #endif
1278
+ #if defined(JSON_HEDLEY_NON_NULL)
1279
+ #undef JSON_HEDLEY_NON_NULL
1280
+ #endif
1281
+ #if \
1282
+ JSON_HEDLEY_HAS_ATTRIBUTE(nonnull) || \
1283
+ JSON_HEDLEY_GCC_VERSION_CHECK(3,3,0) || \
1284
+ JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \
1285
+ JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0)
1286
+ #define JSON_HEDLEY_NON_NULL(...) __attribute__((__nonnull__(__VA_ARGS__)))
1287
+ #else
1288
+ #define JSON_HEDLEY_NON_NULL(...)
1289
+ #endif
1290
+ JSON_HEDLEY_DIAGNOSTIC_POP
1291
+
1292
+ #if defined(JSON_HEDLEY_PRINTF_FORMAT)
1293
+ #undef JSON_HEDLEY_PRINTF_FORMAT
1294
+ #endif
1295
+ #if defined(__MINGW32__) && JSON_HEDLEY_GCC_HAS_ATTRIBUTE(format,4,4,0) && !defined(__USE_MINGW_ANSI_STDIO)
1296
+ #define JSON_HEDLEY_PRINTF_FORMAT(string_idx,first_to_check) __attribute__((__format__(ms_printf, string_idx, first_to_check)))
1297
+ #elif defined(__MINGW32__) && JSON_HEDLEY_GCC_HAS_ATTRIBUTE(format,4,4,0) && defined(__USE_MINGW_ANSI_STDIO)
1298
+ #define JSON_HEDLEY_PRINTF_FORMAT(string_idx,first_to_check) __attribute__((__format__(gnu_printf, string_idx, first_to_check)))
1299
+ #elif \
1300
+ JSON_HEDLEY_HAS_ATTRIBUTE(format) || \
1301
+ JSON_HEDLEY_GCC_VERSION_CHECK(3,1,0) || \
1302
+ JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \
1303
+ JSON_HEDLEY_ARM_VERSION_CHECK(5,6,0) || \
1304
+ JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0) || \
1305
+ JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \
1306
+ (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \
1307
+ JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \
1308
+ (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \
1309
+ JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \
1310
+ (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \
1311
+ JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \
1312
+ (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \
1313
+ JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) || \
1314
+ JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \
1315
+ JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) || \
1316
+ JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10)
1317
+ #define JSON_HEDLEY_PRINTF_FORMAT(string_idx,first_to_check) __attribute__((__format__(__printf__, string_idx, first_to_check)))
1318
+ #elif JSON_HEDLEY_PELLES_VERSION_CHECK(6,0,0)
1319
+ #define JSON_HEDLEY_PRINTF_FORMAT(string_idx,first_to_check) __declspec(vaformat(printf,string_idx,first_to_check))
1320
+ #else
1321
+ #define JSON_HEDLEY_PRINTF_FORMAT(string_idx,first_to_check)
1322
+ #endif
1323
+
1324
+ #if defined(JSON_HEDLEY_CONSTEXPR)
1325
+ #undef JSON_HEDLEY_CONSTEXPR
1326
+ #endif
1327
+ #if defined(__cplusplus)
1328
+ #if __cplusplus >= 201103L
1329
+ #define JSON_HEDLEY_CONSTEXPR JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_(constexpr)
1330
+ #endif
1331
+ #endif
1332
+ #if !defined(JSON_HEDLEY_CONSTEXPR)
1333
+ #define JSON_HEDLEY_CONSTEXPR
1334
+ #endif
1335
+
1336
+ #if defined(JSON_HEDLEY_PREDICT)
1337
+ #undef JSON_HEDLEY_PREDICT
1338
+ #endif
1339
+ #if defined(JSON_HEDLEY_LIKELY)
1340
+ #undef JSON_HEDLEY_LIKELY
1341
+ #endif
1342
+ #if defined(JSON_HEDLEY_UNLIKELY)
1343
+ #undef JSON_HEDLEY_UNLIKELY
1344
+ #endif
1345
+ #if defined(JSON_HEDLEY_UNPREDICTABLE)
1346
+ #undef JSON_HEDLEY_UNPREDICTABLE
1347
+ #endif
1348
+ #if JSON_HEDLEY_HAS_BUILTIN(__builtin_unpredictable)
1349
+ #define JSON_HEDLEY_UNPREDICTABLE(expr) __builtin_unpredictable((expr))
1350
+ #endif
1351
+ #if \
1352
+ (JSON_HEDLEY_HAS_BUILTIN(__builtin_expect_with_probability) && !defined(JSON_HEDLEY_PGI_VERSION)) || \
1353
+ JSON_HEDLEY_GCC_VERSION_CHECK(9,0,0) || \
1354
+ JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10)
1355
+ # define JSON_HEDLEY_PREDICT(expr, value, probability) __builtin_expect_with_probability( (expr), (value), (probability))
1356
+ # define JSON_HEDLEY_PREDICT_TRUE(expr, probability) __builtin_expect_with_probability(!!(expr), 1 , (probability))
1357
+ # define JSON_HEDLEY_PREDICT_FALSE(expr, probability) __builtin_expect_with_probability(!!(expr), 0 , (probability))
1358
+ # define JSON_HEDLEY_LIKELY(expr) __builtin_expect (!!(expr), 1 )
1359
+ # define JSON_HEDLEY_UNLIKELY(expr) __builtin_expect (!!(expr), 0 )
1360
+ #elif \
1361
+ (JSON_HEDLEY_HAS_BUILTIN(__builtin_expect) && !defined(JSON_HEDLEY_INTEL_CL_VERSION)) || \
1362
+ JSON_HEDLEY_GCC_VERSION_CHECK(3,0,0) || \
1363
+ JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \
1364
+ (JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,15,0) && defined(__cplusplus)) || \
1365
+ JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \
1366
+ JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0) || \
1367
+ JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \
1368
+ JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,7,0) || \
1369
+ JSON_HEDLEY_TI_CL430_VERSION_CHECK(3,1,0) || \
1370
+ JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,1,0) || \
1371
+ JSON_HEDLEY_TI_CL6X_VERSION_CHECK(6,1,0) || \
1372
+ JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \
1373
+ JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) || \
1374
+ JSON_HEDLEY_TINYC_VERSION_CHECK(0,9,27) || \
1375
+ JSON_HEDLEY_CRAY_VERSION_CHECK(8,1,0) || \
1376
+ JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10)
1377
+ # define JSON_HEDLEY_PREDICT(expr, expected, probability) \
1378
+ (((probability) >= 0.9) ? __builtin_expect((expr), (expected)) : (JSON_HEDLEY_STATIC_CAST(void, expected), (expr)))
1379
+ # define JSON_HEDLEY_PREDICT_TRUE(expr, probability) \
1380
+ (__extension__ ({ \
1381
+ double hedley_probability_ = (probability); \
1382
+ ((hedley_probability_ >= 0.9) ? __builtin_expect(!!(expr), 1) : ((hedley_probability_ <= 0.1) ? __builtin_expect(!!(expr), 0) : !!(expr))); \
1383
+ }))
1384
+ # define JSON_HEDLEY_PREDICT_FALSE(expr, probability) \
1385
+ (__extension__ ({ \
1386
+ double hedley_probability_ = (probability); \
1387
+ ((hedley_probability_ >= 0.9) ? __builtin_expect(!!(expr), 0) : ((hedley_probability_ <= 0.1) ? __builtin_expect(!!(expr), 1) : !!(expr))); \
1388
+ }))
1389
+ # define JSON_HEDLEY_LIKELY(expr) __builtin_expect(!!(expr), 1)
1390
+ # define JSON_HEDLEY_UNLIKELY(expr) __builtin_expect(!!(expr), 0)
1391
+ #else
1392
+ # define JSON_HEDLEY_PREDICT(expr, expected, probability) (JSON_HEDLEY_STATIC_CAST(void, expected), (expr))
1393
+ # define JSON_HEDLEY_PREDICT_TRUE(expr, probability) (!!(expr))
1394
+ # define JSON_HEDLEY_PREDICT_FALSE(expr, probability) (!!(expr))
1395
+ # define JSON_HEDLEY_LIKELY(expr) (!!(expr))
1396
+ # define JSON_HEDLEY_UNLIKELY(expr) (!!(expr))
1397
+ #endif
1398
+ #if !defined(JSON_HEDLEY_UNPREDICTABLE)
1399
+ #define JSON_HEDLEY_UNPREDICTABLE(expr) JSON_HEDLEY_PREDICT(expr, 1, 0.5)
1400
+ #endif
1401
+
1402
+ #if defined(JSON_HEDLEY_MALLOC)
1403
+ #undef JSON_HEDLEY_MALLOC
1404
+ #endif
1405
+ #if \
1406
+ JSON_HEDLEY_HAS_ATTRIBUTE(malloc) || \
1407
+ JSON_HEDLEY_GCC_VERSION_CHECK(3,1,0) || \
1408
+ JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \
1409
+ JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,11,0) || \
1410
+ JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \
1411
+ JSON_HEDLEY_IBM_VERSION_CHECK(12,1,0) || \
1412
+ JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \
1413
+ (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \
1414
+ JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \
1415
+ (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \
1416
+ JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \
1417
+ (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \
1418
+ JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \
1419
+ (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \
1420
+ JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) || \
1421
+ JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \
1422
+ JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) || \
1423
+ JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10)
1424
+ #define JSON_HEDLEY_MALLOC __attribute__((__malloc__))
1425
+ #elif JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,10,0)
1426
+ #define JSON_HEDLEY_MALLOC _Pragma("returns_new_memory")
1427
+ #elif \
1428
+ JSON_HEDLEY_MSVC_VERSION_CHECK(14,0,0) || \
1429
+ JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0)
1430
+ #define JSON_HEDLEY_MALLOC __declspec(restrict)
1431
+ #else
1432
+ #define JSON_HEDLEY_MALLOC
1433
+ #endif
1434
+
1435
+ #if defined(JSON_HEDLEY_PURE)
1436
+ #undef JSON_HEDLEY_PURE
1437
+ #endif
1438
+ #if \
1439
+ JSON_HEDLEY_HAS_ATTRIBUTE(pure) || \
1440
+ JSON_HEDLEY_GCC_VERSION_CHECK(2,96,0) || \
1441
+ JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \
1442
+ JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,11,0) || \
1443
+ JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \
1444
+ JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0) || \
1445
+ JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \
1446
+ (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \
1447
+ JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \
1448
+ (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \
1449
+ JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \
1450
+ (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \
1451
+ JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \
1452
+ (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \
1453
+ JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) || \
1454
+ JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \
1455
+ JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) || \
1456
+ JSON_HEDLEY_PGI_VERSION_CHECK(17,10,0) || \
1457
+ JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10)
1458
+ # define JSON_HEDLEY_PURE __attribute__((__pure__))
1459
+ #elif JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,10,0)
1460
+ # define JSON_HEDLEY_PURE _Pragma("does_not_write_global_data")
1461
+ #elif defined(__cplusplus) && \
1462
+ ( \
1463
+ JSON_HEDLEY_TI_CL430_VERSION_CHECK(2,0,1) || \
1464
+ JSON_HEDLEY_TI_CL6X_VERSION_CHECK(4,0,0) || \
1465
+ JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) \
1466
+ )
1467
+ # define JSON_HEDLEY_PURE _Pragma("FUNC_IS_PURE;")
1468
+ #else
1469
+ # define JSON_HEDLEY_PURE
1470
+ #endif
1471
+
1472
+ #if defined(JSON_HEDLEY_CONST)
1473
+ #undef JSON_HEDLEY_CONST
1474
+ #endif
1475
+ #if \
1476
+ JSON_HEDLEY_HAS_ATTRIBUTE(const) || \
1477
+ JSON_HEDLEY_GCC_VERSION_CHECK(2,5,0) || \
1478
+ JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \
1479
+ JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,11,0) || \
1480
+ JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \
1481
+ JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0) || \
1482
+ JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \
1483
+ (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \
1484
+ JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \
1485
+ (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \
1486
+ JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \
1487
+ (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \
1488
+ JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \
1489
+ (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \
1490
+ JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) || \
1491
+ JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \
1492
+ JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) || \
1493
+ JSON_HEDLEY_PGI_VERSION_CHECK(17,10,0) || \
1494
+ JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10)
1495
+ #define JSON_HEDLEY_CONST __attribute__((__const__))
1496
+ #elif \
1497
+ JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,10,0)
1498
+ #define JSON_HEDLEY_CONST _Pragma("no_side_effect")
1499
+ #else
1500
+ #define JSON_HEDLEY_CONST JSON_HEDLEY_PURE
1501
+ #endif
1502
+
1503
+ #if defined(JSON_HEDLEY_RESTRICT)
1504
+ #undef JSON_HEDLEY_RESTRICT
1505
+ #endif
1506
+ #if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) && !defined(__cplusplus)
1507
+ #define JSON_HEDLEY_RESTRICT restrict
1508
+ #elif \
1509
+ JSON_HEDLEY_GCC_VERSION_CHECK(3,1,0) || \
1510
+ JSON_HEDLEY_MSVC_VERSION_CHECK(14,0,0) || \
1511
+ JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \
1512
+ JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) || \
1513
+ JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \
1514
+ JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0) || \
1515
+ JSON_HEDLEY_PGI_VERSION_CHECK(17,10,0) || \
1516
+ JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \
1517
+ JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,2,4) || \
1518
+ JSON_HEDLEY_TI_CL6X_VERSION_CHECK(8,1,0) || \
1519
+ JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \
1520
+ (JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,14,0) && defined(__cplusplus)) || \
1521
+ JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0) || \
1522
+ defined(__clang__) || \
1523
+ JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10)
1524
+ #define JSON_HEDLEY_RESTRICT __restrict
1525
+ #elif JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,3,0) && !defined(__cplusplus)
1526
+ #define JSON_HEDLEY_RESTRICT _Restrict
1527
+ #else
1528
+ #define JSON_HEDLEY_RESTRICT
1529
+ #endif
1530
+
1531
+ #if defined(JSON_HEDLEY_INLINE)
1532
+ #undef JSON_HEDLEY_INLINE
1533
+ #endif
1534
+ #if \
1535
+ (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)) || \
1536
+ (defined(__cplusplus) && (__cplusplus >= 199711L))
1537
+ #define JSON_HEDLEY_INLINE inline
1538
+ #elif \
1539
+ defined(JSON_HEDLEY_GCC_VERSION) || \
1540
+ JSON_HEDLEY_ARM_VERSION_CHECK(6,2,0)
1541
+ #define JSON_HEDLEY_INLINE __inline__
1542
+ #elif \
1543
+ JSON_HEDLEY_MSVC_VERSION_CHECK(12,0,0) || \
1544
+ JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) || \
1545
+ JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \
1546
+ JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,1,0) || \
1547
+ JSON_HEDLEY_TI_CL430_VERSION_CHECK(3,1,0) || \
1548
+ JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,2,0) || \
1549
+ JSON_HEDLEY_TI_CL6X_VERSION_CHECK(8,0,0) || \
1550
+ JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \
1551
+ JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) || \
1552
+ JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10)
1553
+ #define JSON_HEDLEY_INLINE __inline
1554
+ #else
1555
+ #define JSON_HEDLEY_INLINE
1556
+ #endif
1557
+
1558
+ #if defined(JSON_HEDLEY_ALWAYS_INLINE)
1559
+ #undef JSON_HEDLEY_ALWAYS_INLINE
1560
+ #endif
1561
+ #if \
1562
+ JSON_HEDLEY_HAS_ATTRIBUTE(always_inline) || \
1563
+ JSON_HEDLEY_GCC_VERSION_CHECK(4,0,0) || \
1564
+ JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \
1565
+ JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,11,0) || \
1566
+ JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \
1567
+ JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0) || \
1568
+ JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \
1569
+ (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \
1570
+ JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \
1571
+ (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \
1572
+ JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \
1573
+ (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \
1574
+ JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \
1575
+ (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \
1576
+ JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) || \
1577
+ JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \
1578
+ JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) || \
1579
+ JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) || \
1580
+ JSON_HEDLEY_IAR_VERSION_CHECK(8,10,0)
1581
+ # define JSON_HEDLEY_ALWAYS_INLINE __attribute__((__always_inline__)) JSON_HEDLEY_INLINE
1582
+ #elif \
1583
+ JSON_HEDLEY_MSVC_VERSION_CHECK(12,0,0) || \
1584
+ JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0)
1585
+ # define JSON_HEDLEY_ALWAYS_INLINE __forceinline
1586
+ #elif defined(__cplusplus) && \
1587
+ ( \
1588
+ JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \
1589
+ JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \
1590
+ JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \
1591
+ JSON_HEDLEY_TI_CL6X_VERSION_CHECK(6,1,0) || \
1592
+ JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \
1593
+ JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) \
1594
+ )
1595
+ # define JSON_HEDLEY_ALWAYS_INLINE _Pragma("FUNC_ALWAYS_INLINE;")
1596
+ #elif JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0)
1597
+ # define JSON_HEDLEY_ALWAYS_INLINE _Pragma("inline=forced")
1598
+ #else
1599
+ # define JSON_HEDLEY_ALWAYS_INLINE JSON_HEDLEY_INLINE
1600
+ #endif
1601
+
1602
+ #if defined(JSON_HEDLEY_NEVER_INLINE)
1603
+ #undef JSON_HEDLEY_NEVER_INLINE
1604
+ #endif
1605
+ #if \
1606
+ JSON_HEDLEY_HAS_ATTRIBUTE(noinline) || \
1607
+ JSON_HEDLEY_GCC_VERSION_CHECK(4,0,0) || \
1608
+ JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \
1609
+ JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,11,0) || \
1610
+ JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \
1611
+ JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0) || \
1612
+ JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \
1613
+ (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \
1614
+ JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \
1615
+ (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \
1616
+ JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \
1617
+ (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \
1618
+ JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \
1619
+ (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \
1620
+ JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) || \
1621
+ JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \
1622
+ JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) || \
1623
+ JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) || \
1624
+ JSON_HEDLEY_IAR_VERSION_CHECK(8,10,0)
1625
+ #define JSON_HEDLEY_NEVER_INLINE __attribute__((__noinline__))
1626
+ #elif \
1627
+ JSON_HEDLEY_MSVC_VERSION_CHECK(13,10,0) || \
1628
+ JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0)
1629
+ #define JSON_HEDLEY_NEVER_INLINE __declspec(noinline)
1630
+ #elif JSON_HEDLEY_PGI_VERSION_CHECK(10,2,0)
1631
+ #define JSON_HEDLEY_NEVER_INLINE _Pragma("noinline")
1632
+ #elif JSON_HEDLEY_TI_CL6X_VERSION_CHECK(6,0,0) && defined(__cplusplus)
1633
+ #define JSON_HEDLEY_NEVER_INLINE _Pragma("FUNC_CANNOT_INLINE;")
1634
+ #elif JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0)
1635
+ #define JSON_HEDLEY_NEVER_INLINE _Pragma("inline=never")
1636
+ #elif JSON_HEDLEY_COMPCERT_VERSION_CHECK(3,2,0)
1637
+ #define JSON_HEDLEY_NEVER_INLINE __attribute((noinline))
1638
+ #elif JSON_HEDLEY_PELLES_VERSION_CHECK(9,0,0)
1639
+ #define JSON_HEDLEY_NEVER_INLINE __declspec(noinline)
1640
+ #else
1641
+ #define JSON_HEDLEY_NEVER_INLINE
1642
+ #endif
1643
+
1644
+ #if defined(JSON_HEDLEY_PRIVATE)
1645
+ #undef JSON_HEDLEY_PRIVATE
1646
+ #endif
1647
+ #if defined(JSON_HEDLEY_PUBLIC)
1648
+ #undef JSON_HEDLEY_PUBLIC
1649
+ #endif
1650
+ #if defined(JSON_HEDLEY_IMPORT)
1651
+ #undef JSON_HEDLEY_IMPORT
1652
+ #endif
1653
+ #if defined(_WIN32) || defined(__CYGWIN__)
1654
+ # define JSON_HEDLEY_PRIVATE
1655
+ # define JSON_HEDLEY_PUBLIC __declspec(dllexport)
1656
+ # define JSON_HEDLEY_IMPORT __declspec(dllimport)
1657
+ #else
1658
+ # if \
1659
+ JSON_HEDLEY_HAS_ATTRIBUTE(visibility) || \
1660
+ JSON_HEDLEY_GCC_VERSION_CHECK(3,3,0) || \
1661
+ JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,11,0) || \
1662
+ JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \
1663
+ JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \
1664
+ JSON_HEDLEY_IBM_VERSION_CHECK(13,1,0) || \
1665
+ ( \
1666
+ defined(__TI_EABI__) && \
1667
+ ( \
1668
+ (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \
1669
+ JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) \
1670
+ ) \
1671
+ ) || \
1672
+ JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10)
1673
+ # define JSON_HEDLEY_PRIVATE __attribute__((__visibility__("hidden")))
1674
+ # define JSON_HEDLEY_PUBLIC __attribute__((__visibility__("default")))
1675
+ # else
1676
+ # define JSON_HEDLEY_PRIVATE
1677
+ # define JSON_HEDLEY_PUBLIC
1678
+ # endif
1679
+ # define JSON_HEDLEY_IMPORT extern
1680
+ #endif
1681
+
1682
+ #if defined(JSON_HEDLEY_NO_THROW)
1683
+ #undef JSON_HEDLEY_NO_THROW
1684
+ #endif
1685
+ #if \
1686
+ JSON_HEDLEY_HAS_ATTRIBUTE(nothrow) || \
1687
+ JSON_HEDLEY_GCC_VERSION_CHECK(3,3,0) || \
1688
+ JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \
1689
+ JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10)
1690
+ #define JSON_HEDLEY_NO_THROW __attribute__((__nothrow__))
1691
+ #elif \
1692
+ JSON_HEDLEY_MSVC_VERSION_CHECK(13,1,0) || \
1693
+ JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) || \
1694
+ JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0)
1695
+ #define JSON_HEDLEY_NO_THROW __declspec(nothrow)
1696
+ #else
1697
+ #define JSON_HEDLEY_NO_THROW
1698
+ #endif
1699
+
1700
+ #if defined(JSON_HEDLEY_FALL_THROUGH)
1701
+ #undef JSON_HEDLEY_FALL_THROUGH
1702
+ #endif
1703
+ #if \
1704
+ JSON_HEDLEY_HAS_ATTRIBUTE(fallthrough) || \
1705
+ JSON_HEDLEY_GCC_VERSION_CHECK(7,0,0) || \
1706
+ JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10)
1707
+ #define JSON_HEDLEY_FALL_THROUGH __attribute__((__fallthrough__))
1708
+ #elif JSON_HEDLEY_HAS_CPP_ATTRIBUTE_NS(clang,fallthrough)
1709
+ #define JSON_HEDLEY_FALL_THROUGH JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[clang::fallthrough]])
1710
+ #elif JSON_HEDLEY_HAS_CPP_ATTRIBUTE(fallthrough)
1711
+ #define JSON_HEDLEY_FALL_THROUGH JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[fallthrough]])
1712
+ #elif defined(__fallthrough) /* SAL */
1713
+ #define JSON_HEDLEY_FALL_THROUGH __fallthrough
1714
+ #else
1715
+ #define JSON_HEDLEY_FALL_THROUGH
1716
+ #endif
1717
+
1718
+ #if defined(JSON_HEDLEY_RETURNS_NON_NULL)
1719
+ #undef JSON_HEDLEY_RETURNS_NON_NULL
1720
+ #endif
1721
+ #if \
1722
+ JSON_HEDLEY_HAS_ATTRIBUTE(returns_nonnull) || \
1723
+ JSON_HEDLEY_GCC_VERSION_CHECK(4,9,0) || \
1724
+ JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10)
1725
+ #define JSON_HEDLEY_RETURNS_NON_NULL __attribute__((__returns_nonnull__))
1726
+ #elif defined(_Ret_notnull_) /* SAL */
1727
+ #define JSON_HEDLEY_RETURNS_NON_NULL _Ret_notnull_
1728
+ #else
1729
+ #define JSON_HEDLEY_RETURNS_NON_NULL
1730
+ #endif
1731
+
1732
+ #if defined(JSON_HEDLEY_ARRAY_PARAM)
1733
+ #undef JSON_HEDLEY_ARRAY_PARAM
1734
+ #endif
1735
+ #if \
1736
+ defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) && \
1737
+ !defined(__STDC_NO_VLA__) && \
1738
+ !defined(__cplusplus) && \
1739
+ !defined(JSON_HEDLEY_PGI_VERSION) && \
1740
+ !defined(JSON_HEDLEY_TINYC_VERSION)
1741
+ #define JSON_HEDLEY_ARRAY_PARAM(name) (name)
1742
+ #else
1743
+ #define JSON_HEDLEY_ARRAY_PARAM(name)
1744
+ #endif
1745
+
1746
+ #if defined(JSON_HEDLEY_IS_CONSTANT)
1747
+ #undef JSON_HEDLEY_IS_CONSTANT
1748
+ #endif
1749
+ #if defined(JSON_HEDLEY_REQUIRE_CONSTEXPR)
1750
+ #undef JSON_HEDLEY_REQUIRE_CONSTEXPR
1751
+ #endif
1752
+ /* JSON_HEDLEY_IS_CONSTEXPR_ is for
1753
+ HEDLEY INTERNAL USE ONLY. API subject to change without notice. */
1754
+ #if defined(JSON_HEDLEY_IS_CONSTEXPR_)
1755
+ #undef JSON_HEDLEY_IS_CONSTEXPR_
1756
+ #endif
1757
+ #if \
1758
+ JSON_HEDLEY_HAS_BUILTIN(__builtin_constant_p) || \
1759
+ JSON_HEDLEY_GCC_VERSION_CHECK(3,4,0) || \
1760
+ JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \
1761
+ JSON_HEDLEY_TINYC_VERSION_CHECK(0,9,19) || \
1762
+ JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \
1763
+ JSON_HEDLEY_IBM_VERSION_CHECK(13,1,0) || \
1764
+ JSON_HEDLEY_TI_CL6X_VERSION_CHECK(6,1,0) || \
1765
+ (JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,10,0) && !defined(__cplusplus)) || \
1766
+ JSON_HEDLEY_CRAY_VERSION_CHECK(8,1,0) || \
1767
+ JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10)
1768
+ #define JSON_HEDLEY_IS_CONSTANT(expr) __builtin_constant_p(expr)
1769
+ #endif
1770
+ #if !defined(__cplusplus)
1771
+ # if \
1772
+ JSON_HEDLEY_HAS_BUILTIN(__builtin_types_compatible_p) || \
1773
+ JSON_HEDLEY_GCC_VERSION_CHECK(3,4,0) || \
1774
+ JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \
1775
+ JSON_HEDLEY_IBM_VERSION_CHECK(13,1,0) || \
1776
+ JSON_HEDLEY_CRAY_VERSION_CHECK(8,1,0) || \
1777
+ JSON_HEDLEY_ARM_VERSION_CHECK(5,4,0) || \
1778
+ JSON_HEDLEY_TINYC_VERSION_CHECK(0,9,24)
1779
+ #if defined(__INTPTR_TYPE__)
1780
+ #define JSON_HEDLEY_IS_CONSTEXPR_(expr) __builtin_types_compatible_p(__typeof__((1 ? (void*) ((__INTPTR_TYPE__) ((expr) * 0)) : (int*) 0)), int*)
1781
+ #else
1782
+ #include <stdint.h>
1783
+ #define JSON_HEDLEY_IS_CONSTEXPR_(expr) __builtin_types_compatible_p(__typeof__((1 ? (void*) ((intptr_t) ((expr) * 0)) : (int*) 0)), int*)
1784
+ #endif
1785
+ # elif \
1786
+ ( \
1787
+ defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L) && \
1788
+ !defined(JSON_HEDLEY_SUNPRO_VERSION) && \
1789
+ !defined(JSON_HEDLEY_PGI_VERSION) && \
1790
+ !defined(JSON_HEDLEY_IAR_VERSION)) || \
1791
+ (JSON_HEDLEY_HAS_EXTENSION(c_generic_selections) && !defined(JSON_HEDLEY_IAR_VERSION)) || \
1792
+ JSON_HEDLEY_GCC_VERSION_CHECK(4,9,0) || \
1793
+ JSON_HEDLEY_INTEL_VERSION_CHECK(17,0,0) || \
1794
+ JSON_HEDLEY_IBM_VERSION_CHECK(12,1,0) || \
1795
+ JSON_HEDLEY_ARM_VERSION_CHECK(5,3,0)
1796
+ #if defined(__INTPTR_TYPE__)
1797
+ #define JSON_HEDLEY_IS_CONSTEXPR_(expr) _Generic((1 ? (void*) ((__INTPTR_TYPE__) ((expr) * 0)) : (int*) 0), int*: 1, void*: 0)
1798
+ #else
1799
+ #include <stdint.h>
1800
+ #define JSON_HEDLEY_IS_CONSTEXPR_(expr) _Generic((1 ? (void*) ((intptr_t) * 0) : (int*) 0), int*: 1, void*: 0)
1801
+ #endif
1802
+ # elif \
1803
+ defined(JSON_HEDLEY_GCC_VERSION) || \
1804
+ defined(JSON_HEDLEY_INTEL_VERSION) || \
1805
+ defined(JSON_HEDLEY_TINYC_VERSION) || \
1806
+ defined(JSON_HEDLEY_TI_ARMCL_VERSION) || \
1807
+ JSON_HEDLEY_TI_CL430_VERSION_CHECK(18,12,0) || \
1808
+ defined(JSON_HEDLEY_TI_CL2000_VERSION) || \
1809
+ defined(JSON_HEDLEY_TI_CL6X_VERSION) || \
1810
+ defined(JSON_HEDLEY_TI_CL7X_VERSION) || \
1811
+ defined(JSON_HEDLEY_TI_CLPRU_VERSION) || \
1812
+ defined(__clang__)
1813
+ # define JSON_HEDLEY_IS_CONSTEXPR_(expr) ( \
1814
+ sizeof(void) != \
1815
+ sizeof(*( \
1816
+ 1 ? \
1817
+ ((void*) ((expr) * 0L) ) : \
1818
+ ((struct { char v[sizeof(void) * 2]; } *) 1) \
1819
+ ) \
1820
+ ) \
1821
+ )
1822
+ # endif
1823
+ #endif
1824
+ #if defined(JSON_HEDLEY_IS_CONSTEXPR_)
1825
+ #if !defined(JSON_HEDLEY_IS_CONSTANT)
1826
+ #define JSON_HEDLEY_IS_CONSTANT(expr) JSON_HEDLEY_IS_CONSTEXPR_(expr)
1827
+ #endif
1828
+ #define JSON_HEDLEY_REQUIRE_CONSTEXPR(expr) (JSON_HEDLEY_IS_CONSTEXPR_(expr) ? (expr) : (-1))
1829
+ #else
1830
+ #if !defined(JSON_HEDLEY_IS_CONSTANT)
1831
+ #define JSON_HEDLEY_IS_CONSTANT(expr) (0)
1832
+ #endif
1833
+ #define JSON_HEDLEY_REQUIRE_CONSTEXPR(expr) (expr)
1834
+ #endif
1835
+
1836
+ #if defined(JSON_HEDLEY_BEGIN_C_DECLS)
1837
+ #undef JSON_HEDLEY_BEGIN_C_DECLS
1838
+ #endif
1839
+ #if defined(JSON_HEDLEY_END_C_DECLS)
1840
+ #undef JSON_HEDLEY_END_C_DECLS
1841
+ #endif
1842
+ #if defined(JSON_HEDLEY_C_DECL)
1843
+ #undef JSON_HEDLEY_C_DECL
1844
+ #endif
1845
+ #if defined(__cplusplus)
1846
+ #define JSON_HEDLEY_BEGIN_C_DECLS extern "C" {
1847
+ #define JSON_HEDLEY_END_C_DECLS }
1848
+ #define JSON_HEDLEY_C_DECL extern "C"
1849
+ #else
1850
+ #define JSON_HEDLEY_BEGIN_C_DECLS
1851
+ #define JSON_HEDLEY_END_C_DECLS
1852
+ #define JSON_HEDLEY_C_DECL
1853
+ #endif
1854
+
1855
+ #if defined(JSON_HEDLEY_STATIC_ASSERT)
1856
+ #undef JSON_HEDLEY_STATIC_ASSERT
1857
+ #endif
1858
+ #if \
1859
+ !defined(__cplusplus) && ( \
1860
+ (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L)) || \
1861
+ (JSON_HEDLEY_HAS_FEATURE(c_static_assert) && !defined(JSON_HEDLEY_INTEL_CL_VERSION)) || \
1862
+ JSON_HEDLEY_GCC_VERSION_CHECK(6,0,0) || \
1863
+ JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \
1864
+ defined(_Static_assert) \
1865
+ )
1866
+ # define JSON_HEDLEY_STATIC_ASSERT(expr, message) _Static_assert(expr, message)
1867
+ #elif \
1868
+ (defined(__cplusplus) && (__cplusplus >= 201103L)) || \
1869
+ JSON_HEDLEY_MSVC_VERSION_CHECK(16,0,0) || \
1870
+ JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0)
1871
+ # define JSON_HEDLEY_STATIC_ASSERT(expr, message) JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_(static_assert(expr, message))
1872
+ #else
1873
+ # define JSON_HEDLEY_STATIC_ASSERT(expr, message)
1874
+ #endif
1875
+
1876
+ #if defined(JSON_HEDLEY_NULL)
1877
+ #undef JSON_HEDLEY_NULL
1878
+ #endif
1879
+ #if defined(__cplusplus)
1880
+ #if __cplusplus >= 201103L
1881
+ #define JSON_HEDLEY_NULL JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_(nullptr)
1882
+ #elif defined(NULL)
1883
+ #define JSON_HEDLEY_NULL NULL
1884
+ #else
1885
+ #define JSON_HEDLEY_NULL JSON_HEDLEY_STATIC_CAST(void*, 0)
1886
+ #endif
1887
+ #elif defined(NULL)
1888
+ #define JSON_HEDLEY_NULL NULL
1889
+ #else
1890
+ #define JSON_HEDLEY_NULL ((void*) 0)
1891
+ #endif
1892
+
1893
+ #if defined(JSON_HEDLEY_MESSAGE)
1894
+ #undef JSON_HEDLEY_MESSAGE
1895
+ #endif
1896
+ #if JSON_HEDLEY_HAS_WARNING("-Wunknown-pragmas")
1897
+ # define JSON_HEDLEY_MESSAGE(msg) \
1898
+ JSON_HEDLEY_DIAGNOSTIC_PUSH \
1899
+ JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS \
1900
+ JSON_HEDLEY_PRAGMA(message msg) \
1901
+ JSON_HEDLEY_DIAGNOSTIC_POP
1902
+ #elif \
1903
+ JSON_HEDLEY_GCC_VERSION_CHECK(4,4,0) || \
1904
+ JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0)
1905
+ # define JSON_HEDLEY_MESSAGE(msg) JSON_HEDLEY_PRAGMA(message msg)
1906
+ #elif JSON_HEDLEY_CRAY_VERSION_CHECK(5,0,0)
1907
+ # define JSON_HEDLEY_MESSAGE(msg) JSON_HEDLEY_PRAGMA(_CRI message msg)
1908
+ #elif JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0)
1909
+ # define JSON_HEDLEY_MESSAGE(msg) JSON_HEDLEY_PRAGMA(message(msg))
1910
+ #elif JSON_HEDLEY_PELLES_VERSION_CHECK(2,0,0)
1911
+ # define JSON_HEDLEY_MESSAGE(msg) JSON_HEDLEY_PRAGMA(message(msg))
1912
+ #else
1913
+ # define JSON_HEDLEY_MESSAGE(msg)
1914
+ #endif
1915
+
1916
+ #if defined(JSON_HEDLEY_WARNING)
1917
+ #undef JSON_HEDLEY_WARNING
1918
+ #endif
1919
+ #if JSON_HEDLEY_HAS_WARNING("-Wunknown-pragmas")
1920
+ # define JSON_HEDLEY_WARNING(msg) \
1921
+ JSON_HEDLEY_DIAGNOSTIC_PUSH \
1922
+ JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS \
1923
+ JSON_HEDLEY_PRAGMA(clang warning msg) \
1924
+ JSON_HEDLEY_DIAGNOSTIC_POP
1925
+ #elif \
1926
+ JSON_HEDLEY_GCC_VERSION_CHECK(4,8,0) || \
1927
+ JSON_HEDLEY_PGI_VERSION_CHECK(18,4,0) || \
1928
+ JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0)
1929
+ # define JSON_HEDLEY_WARNING(msg) JSON_HEDLEY_PRAGMA(GCC warning msg)
1930
+ #elif \
1931
+ JSON_HEDLEY_MSVC_VERSION_CHECK(15,0,0) || \
1932
+ JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0)
1933
+ # define JSON_HEDLEY_WARNING(msg) JSON_HEDLEY_PRAGMA(message(msg))
1934
+ #else
1935
+ # define JSON_HEDLEY_WARNING(msg) JSON_HEDLEY_MESSAGE(msg)
1936
+ #endif
1937
+
1938
+ #if defined(JSON_HEDLEY_REQUIRE)
1939
+ #undef JSON_HEDLEY_REQUIRE
1940
+ #endif
1941
+ #if defined(JSON_HEDLEY_REQUIRE_MSG)
1942
+ #undef JSON_HEDLEY_REQUIRE_MSG
1943
+ #endif
1944
+ #if JSON_HEDLEY_HAS_ATTRIBUTE(diagnose_if)
1945
+ # if JSON_HEDLEY_HAS_WARNING("-Wgcc-compat")
1946
+ # define JSON_HEDLEY_REQUIRE(expr) \
1947
+ JSON_HEDLEY_DIAGNOSTIC_PUSH \
1948
+ _Pragma("clang diagnostic ignored \"-Wgcc-compat\"") \
1949
+ __attribute__((diagnose_if(!(expr), #expr, "error"))) \
1950
+ JSON_HEDLEY_DIAGNOSTIC_POP
1951
+ # define JSON_HEDLEY_REQUIRE_MSG(expr,msg) \
1952
+ JSON_HEDLEY_DIAGNOSTIC_PUSH \
1953
+ _Pragma("clang diagnostic ignored \"-Wgcc-compat\"") \
1954
+ __attribute__((diagnose_if(!(expr), msg, "error"))) \
1955
+ JSON_HEDLEY_DIAGNOSTIC_POP
1956
+ # else
1957
+ # define JSON_HEDLEY_REQUIRE(expr) __attribute__((diagnose_if(!(expr), #expr, "error")))
1958
+ # define JSON_HEDLEY_REQUIRE_MSG(expr,msg) __attribute__((diagnose_if(!(expr), msg, "error")))
1959
+ # endif
1960
+ #else
1961
+ # define JSON_HEDLEY_REQUIRE(expr)
1962
+ # define JSON_HEDLEY_REQUIRE_MSG(expr,msg)
1963
+ #endif
1964
+
1965
+ #if defined(JSON_HEDLEY_FLAGS)
1966
+ #undef JSON_HEDLEY_FLAGS
1967
+ #endif
1968
+ #if JSON_HEDLEY_HAS_ATTRIBUTE(flag_enum) && (!defined(__cplusplus) || JSON_HEDLEY_HAS_WARNING("-Wbitfield-enum-conversion"))
1969
+ #define JSON_HEDLEY_FLAGS __attribute__((__flag_enum__))
1970
+ #else
1971
+ #define JSON_HEDLEY_FLAGS
1972
+ #endif
1973
+
1974
+ #if defined(JSON_HEDLEY_FLAGS_CAST)
1975
+ #undef JSON_HEDLEY_FLAGS_CAST
1976
+ #endif
1977
+ #if JSON_HEDLEY_INTEL_VERSION_CHECK(19,0,0)
1978
+ # define JSON_HEDLEY_FLAGS_CAST(T, expr) (__extension__ ({ \
1979
+ JSON_HEDLEY_DIAGNOSTIC_PUSH \
1980
+ _Pragma("warning(disable:188)") \
1981
+ ((T) (expr)); \
1982
+ JSON_HEDLEY_DIAGNOSTIC_POP \
1983
+ }))
1984
+ #else
1985
+ # define JSON_HEDLEY_FLAGS_CAST(T, expr) JSON_HEDLEY_STATIC_CAST(T, expr)
1986
+ #endif
1987
+
1988
+ #if defined(JSON_HEDLEY_EMPTY_BASES)
1989
+ #undef JSON_HEDLEY_EMPTY_BASES
1990
+ #endif
1991
+ #if \
1992
+ (JSON_HEDLEY_MSVC_VERSION_CHECK(19,0,23918) && !JSON_HEDLEY_MSVC_VERSION_CHECK(20,0,0)) || \
1993
+ JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0)
1994
+ #define JSON_HEDLEY_EMPTY_BASES __declspec(empty_bases)
1995
+ #else
1996
+ #define JSON_HEDLEY_EMPTY_BASES
1997
+ #endif
1998
+
1999
+ /* Remaining macros are deprecated. */
2000
+
2001
+ #if defined(JSON_HEDLEY_GCC_NOT_CLANG_VERSION_CHECK)
2002
+ #undef JSON_HEDLEY_GCC_NOT_CLANG_VERSION_CHECK
2003
+ #endif
2004
+ #if defined(__clang__)
2005
+ #define JSON_HEDLEY_GCC_NOT_CLANG_VERSION_CHECK(major,minor,patch) (0)
2006
+ #else
2007
+ #define JSON_HEDLEY_GCC_NOT_CLANG_VERSION_CHECK(major,minor,patch) JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch)
2008
+ #endif
2009
+
2010
+ #if defined(JSON_HEDLEY_CLANG_HAS_ATTRIBUTE)
2011
+ #undef JSON_HEDLEY_CLANG_HAS_ATTRIBUTE
2012
+ #endif
2013
+ #define JSON_HEDLEY_CLANG_HAS_ATTRIBUTE(attribute) JSON_HEDLEY_HAS_ATTRIBUTE(attribute)
2014
+
2015
+ #if defined(JSON_HEDLEY_CLANG_HAS_CPP_ATTRIBUTE)
2016
+ #undef JSON_HEDLEY_CLANG_HAS_CPP_ATTRIBUTE
2017
+ #endif
2018
+ #define JSON_HEDLEY_CLANG_HAS_CPP_ATTRIBUTE(attribute) JSON_HEDLEY_HAS_CPP_ATTRIBUTE(attribute)
2019
+
2020
+ #if defined(JSON_HEDLEY_CLANG_HAS_BUILTIN)
2021
+ #undef JSON_HEDLEY_CLANG_HAS_BUILTIN
2022
+ #endif
2023
+ #define JSON_HEDLEY_CLANG_HAS_BUILTIN(builtin) JSON_HEDLEY_HAS_BUILTIN(builtin)
2024
+
2025
+ #if defined(JSON_HEDLEY_CLANG_HAS_FEATURE)
2026
+ #undef JSON_HEDLEY_CLANG_HAS_FEATURE
2027
+ #endif
2028
+ #define JSON_HEDLEY_CLANG_HAS_FEATURE(feature) JSON_HEDLEY_HAS_FEATURE(feature)
2029
+
2030
+ #if defined(JSON_HEDLEY_CLANG_HAS_EXTENSION)
2031
+ #undef JSON_HEDLEY_CLANG_HAS_EXTENSION
2032
+ #endif
2033
+ #define JSON_HEDLEY_CLANG_HAS_EXTENSION(extension) JSON_HEDLEY_HAS_EXTENSION(extension)
2034
+
2035
+ #if defined(JSON_HEDLEY_CLANG_HAS_DECLSPEC_DECLSPEC_ATTRIBUTE)
2036
+ #undef JSON_HEDLEY_CLANG_HAS_DECLSPEC_DECLSPEC_ATTRIBUTE
2037
+ #endif
2038
+ #define JSON_HEDLEY_CLANG_HAS_DECLSPEC_ATTRIBUTE(attribute) JSON_HEDLEY_HAS_DECLSPEC_ATTRIBUTE(attribute)
2039
+
2040
+ #if defined(JSON_HEDLEY_CLANG_HAS_WARNING)
2041
+ #undef JSON_HEDLEY_CLANG_HAS_WARNING
2042
+ #endif
2043
+ #define JSON_HEDLEY_CLANG_HAS_WARNING(warning) JSON_HEDLEY_HAS_WARNING(warning)
2044
+
2045
+ #endif /* !defined(JSON_HEDLEY_VERSION) || (JSON_HEDLEY_VERSION < X) */