2019-06-30 20:14:02 +00:00
|
|
|
/* Hedley - https://nemequ.github.io/hedley
|
|
|
|
* Created by Evan Nemerson <evan@nemerson.com>
|
|
|
|
*
|
|
|
|
* To the extent possible under law, the author(s) have dedicated all
|
|
|
|
* copyright and related and neighboring rights to this software to
|
|
|
|
* the public domain worldwide. This software is distributed without
|
|
|
|
* any warranty.
|
|
|
|
*
|
|
|
|
* For details, see <http://creativecommons.org/publicdomain/zero/1.0/>.
|
|
|
|
* SPDX-License-Identifier: CC0-1.0
|
|
|
|
*/
|
|
|
|
|
2019-07-01 20:24:39 +00:00
|
|
|
#if !defined(NLOHMANN_JSON_HEDLEY_VERSION) || (NLOHMANN_JSON_HEDLEY_VERSION < 9)
|
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_VERSION)
|
|
|
|
#undef NLOHMANN_JSON_HEDLEY_VERSION
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_VERSION 9
|
2019-06-30 20:14:02 +00:00
|
|
|
|
2019-07-01 20:24:39 +00:00
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_STRINGIFY_EX)
|
|
|
|
#undef NLOHMANN_JSON_HEDLEY_STRINGIFY_EX
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_STRINGIFY_EX(x) #x
|
2019-06-30 20:14:02 +00:00
|
|
|
|
2019-07-01 20:24:39 +00:00
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_STRINGIFY)
|
|
|
|
#undef NLOHMANN_JSON_HEDLEY_STRINGIFY
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_STRINGIFY(x) NLOHMANN_JSON_HEDLEY_STRINGIFY_EX(x)
|
2019-06-30 20:14:02 +00:00
|
|
|
|
2019-07-01 20:24:39 +00:00
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_CONCAT_EX)
|
|
|
|
#undef NLOHMANN_JSON_HEDLEY_CONCAT_EX
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_CONCAT_EX(a,b) a##b
|
2019-06-30 20:14:02 +00:00
|
|
|
|
2019-07-01 20:24:39 +00:00
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_CONCAT)
|
|
|
|
#undef NLOHMANN_JSON_HEDLEY_CONCAT
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_CONCAT(a,b) NLOHMANN_JSON_HEDLEY_CONCAT_EX(a,b)
|
2019-06-30 20:14:02 +00:00
|
|
|
|
2019-07-01 20:24:39 +00:00
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_VERSION_ENCODE)
|
|
|
|
#undef NLOHMANN_JSON_HEDLEY_VERSION_ENCODE
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_VERSION_ENCODE(major,minor,revision) (((major) * 1000000) + ((minor) * 1000) + (revision))
|
2019-06-30 20:14:02 +00:00
|
|
|
|
2019-07-01 20:24:39 +00:00
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_VERSION_DECODE_MAJOR)
|
|
|
|
#undef NLOHMANN_JSON_HEDLEY_VERSION_DECODE_MAJOR
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_VERSION_DECODE_MAJOR(version) ((version) / 1000000)
|
2019-06-30 20:14:02 +00:00
|
|
|
|
2019-07-01 20:24:39 +00:00
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_VERSION_DECODE_MINOR)
|
|
|
|
#undef NLOHMANN_JSON_HEDLEY_VERSION_DECODE_MINOR
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_VERSION_DECODE_MINOR(version) (((version) % 1000000) / 1000)
|
2019-06-30 20:14:02 +00:00
|
|
|
|
2019-07-01 20:24:39 +00:00
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_VERSION_DECODE_REVISION)
|
|
|
|
#undef NLOHMANN_JSON_HEDLEY_VERSION_DECODE_REVISION
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_VERSION_DECODE_REVISION(version) ((version) % 1000)
|
2019-06-30 20:14:02 +00:00
|
|
|
|
2019-07-01 20:24:39 +00:00
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_GNUC_VERSION)
|
|
|
|
#undef NLOHMANN_JSON_HEDLEY_GNUC_VERSION
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
#if defined(__GNUC__) && defined(__GNUC_PATCHLEVEL__)
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_GNUC_VERSION NLOHMANN_JSON_HEDLEY_VERSION_ENCODE(__GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__)
|
2019-06-30 20:14:02 +00:00
|
|
|
#elif defined(__GNUC__)
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_GNUC_VERSION NLOHMANN_JSON_HEDLEY_VERSION_ENCODE(__GNUC__, __GNUC_MINOR__, 0)
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
|
2019-07-01 20:24:39 +00:00
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_GNUC_VERSION_CHECK)
|
|
|
|
#undef NLOHMANN_JSON_HEDLEY_GNUC_VERSION_CHECK
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
2019-07-01 20:24:39 +00:00
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_GNUC_VERSION)
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch) (NLOHMANN_JSON_HEDLEY_GNUC_VERSION >= NLOHMANN_JSON_HEDLEY_VERSION_ENCODE(major, minor, patch))
|
2019-06-30 20:14:02 +00:00
|
|
|
#else
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch) (0)
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
|
2019-07-01 20:24:39 +00:00
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_MSVC_VERSION)
|
|
|
|
#undef NLOHMANN_JSON_HEDLEY_MSVC_VERSION
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
#if defined(_MSC_FULL_VER) && (_MSC_FULL_VER >= 140000000)
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_MSVC_VERSION NLOHMANN_JSON_HEDLEY_VERSION_ENCODE(_MSC_FULL_VER / 10000000, (_MSC_FULL_VER % 10000000) / 100000, (_MSC_FULL_VER % 100000) / 100)
|
2019-06-30 20:14:02 +00:00
|
|
|
#elif defined(_MSC_FULL_VER)
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_MSVC_VERSION NLOHMANN_JSON_HEDLEY_VERSION_ENCODE(_MSC_FULL_VER / 1000000, (_MSC_FULL_VER % 1000000) / 10000, (_MSC_FULL_VER % 10000) / 10)
|
2019-06-30 20:14:02 +00:00
|
|
|
#elif defined(_MSC_VER)
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_MSVC_VERSION NLOHMANN_JSON_HEDLEY_VERSION_ENCODE(_MSC_VER / 100, _MSC_VER % 100, 0)
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
|
2019-07-01 20:24:39 +00:00
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_MSVC_VERSION_CHECK)
|
|
|
|
#undef NLOHMANN_JSON_HEDLEY_MSVC_VERSION_CHECK
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
#if !defined(_MSC_VER)
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_MSVC_VERSION_CHECK(major,minor,patch) (0)
|
2019-06-30 20:14:02 +00:00
|
|
|
#elif defined(_MSC_VER) && (_MSC_VER >= 1400)
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_MSVC_VERSION_CHECK(major,minor,patch) (_MSC_FULL_VER >= ((major * 10000000) + (minor * 100000) + (patch)))
|
2019-06-30 20:14:02 +00:00
|
|
|
#elif defined(_MSC_VER) && (_MSC_VER >= 1200)
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_MSVC_VERSION_CHECK(major,minor,patch) (_MSC_FULL_VER >= ((major * 1000000) + (minor * 10000) + (patch)))
|
2019-06-30 20:14:02 +00:00
|
|
|
#else
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_MSVC_VERSION_CHECK(major,minor,patch) (_MSC_VER >= ((major * 100) + (minor)))
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
|
2019-07-01 20:24:39 +00:00
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_INTEL_VERSION)
|
|
|
|
#undef NLOHMANN_JSON_HEDLEY_INTEL_VERSION
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
#if defined(__INTEL_COMPILER) && defined(__INTEL_COMPILER_UPDATE)
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_INTEL_VERSION NLOHMANN_JSON_HEDLEY_VERSION_ENCODE(__INTEL_COMPILER / 100, __INTEL_COMPILER % 100, __INTEL_COMPILER_UPDATE)
|
2019-06-30 20:14:02 +00:00
|
|
|
#elif defined(__INTEL_COMPILER)
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_INTEL_VERSION NLOHMANN_JSON_HEDLEY_VERSION_ENCODE(__INTEL_COMPILER / 100, __INTEL_COMPILER % 100, 0)
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
|
2019-07-01 20:24:39 +00:00
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_INTEL_VERSION_CHECK)
|
|
|
|
#undef NLOHMANN_JSON_HEDLEY_INTEL_VERSION_CHECK
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
2019-07-01 20:24:39 +00:00
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_INTEL_VERSION)
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_INTEL_VERSION_CHECK(major,minor,patch) (NLOHMANN_JSON_HEDLEY_INTEL_VERSION >= NLOHMANN_JSON_HEDLEY_VERSION_ENCODE(major, minor, patch))
|
2019-06-30 20:14:02 +00:00
|
|
|
#else
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_INTEL_VERSION_CHECK(major,minor,patch) (0)
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
|
2019-07-01 20:24:39 +00:00
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_PGI_VERSION)
|
|
|
|
#undef NLOHMANN_JSON_HEDLEY_PGI_VERSION
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
#if defined(__PGI) && defined(__PGIC__) && defined(__PGIC_MINOR__) && defined(__PGIC_PATCHLEVEL__)
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_PGI_VERSION NLOHMANN_JSON_HEDLEY_VERSION_ENCODE(__PGIC__, __PGIC_MINOR__, __PGIC_PATCHLEVEL__)
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
|
2019-07-01 20:24:39 +00:00
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_PGI_VERSION_CHECK)
|
|
|
|
#undef NLOHMANN_JSON_HEDLEY_PGI_VERSION_CHECK
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
2019-07-01 20:24:39 +00:00
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_PGI_VERSION)
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_PGI_VERSION_CHECK(major,minor,patch) (NLOHMANN_JSON_HEDLEY_PGI_VERSION >= NLOHMANN_JSON_HEDLEY_VERSION_ENCODE(major, minor, patch))
|
2019-06-30 20:14:02 +00:00
|
|
|
#else
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_PGI_VERSION_CHECK(major,minor,patch) (0)
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
|
2019-07-01 20:24:39 +00:00
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_SUNPRO_VERSION)
|
|
|
|
#undef NLOHMANN_JSON_HEDLEY_SUNPRO_VERSION
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
#if defined(__SUNPRO_C) && (__SUNPRO_C > 0x1000)
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_SUNPRO_VERSION NLOHMANN_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)
|
2019-06-30 20:14:02 +00:00
|
|
|
#elif defined(__SUNPRO_C)
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_SUNPRO_VERSION NLOHMANN_JSON_HEDLEY_VERSION_ENCODE((__SUNPRO_C >> 8) & 0xf, (__SUNPRO_C >> 4) & 0xf, (__SUNPRO_C) & 0xf)
|
2019-06-30 20:14:02 +00:00
|
|
|
#elif defined(__SUNPRO_CC) && (__SUNPRO_CC > 0x1000)
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_SUNPRO_VERSION NLOHMANN_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)
|
2019-06-30 20:14:02 +00:00
|
|
|
#elif defined(__SUNPRO_CC)
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_SUNPRO_VERSION NLOHMANN_JSON_HEDLEY_VERSION_ENCODE((__SUNPRO_CC >> 8) & 0xf, (__SUNPRO_CC >> 4) & 0xf, (__SUNPRO_CC) & 0xf)
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
|
2019-07-01 20:24:39 +00:00
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_SUNPRO_VERSION_CHECK)
|
|
|
|
#undef NLOHMANN_JSON_HEDLEY_SUNPRO_VERSION_CHECK
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
2019-07-01 20:24:39 +00:00
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_SUNPRO_VERSION)
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_SUNPRO_VERSION_CHECK(major,minor,patch) (NLOHMANN_JSON_HEDLEY_SUNPRO_VERSION >= NLOHMANN_JSON_HEDLEY_VERSION_ENCODE(major, minor, patch))
|
2019-06-30 20:14:02 +00:00
|
|
|
#else
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_SUNPRO_VERSION_CHECK(major,minor,patch) (0)
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
|
2019-07-01 20:24:39 +00:00
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_EMSCRIPTEN_VERSION)
|
|
|
|
#undef NLOHMANN_JSON_HEDLEY_EMSCRIPTEN_VERSION
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
#if defined(__EMSCRIPTEN__)
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_EMSCRIPTEN_VERSION NLOHMANN_JSON_HEDLEY_VERSION_ENCODE(__EMSCRIPTEN_major__, __EMSCRIPTEN_minor__, __EMSCRIPTEN_tiny__)
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
|
2019-07-01 20:24:39 +00:00
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_EMSCRIPTEN_VERSION_CHECK)
|
|
|
|
#undef NLOHMANN_JSON_HEDLEY_EMSCRIPTEN_VERSION_CHECK
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
2019-07-01 20:24:39 +00:00
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_EMSCRIPTEN_VERSION)
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_EMSCRIPTEN_VERSION_CHECK(major,minor,patch) (NLOHMANN_JSON_HEDLEY_EMSCRIPTEN_VERSION >= NLOHMANN_JSON_HEDLEY_VERSION_ENCODE(major, minor, patch))
|
2019-06-30 20:14:02 +00:00
|
|
|
#else
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_EMSCRIPTEN_VERSION_CHECK(major,minor,patch) (0)
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
|
2019-07-01 20:24:39 +00:00
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_ARM_VERSION)
|
|
|
|
#undef NLOHMANN_JSON_HEDLEY_ARM_VERSION
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
#if defined(__CC_ARM) && defined(__ARMCOMPILER_VERSION)
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_ARM_VERSION NLOHMANN_JSON_HEDLEY_VERSION_ENCODE(__ARMCOMPILER_VERSION / 1000000, (__ARMCOMPILER_VERSION % 1000000) / 10000, (__ARMCOMPILER_VERSION % 10000) / 100)
|
2019-06-30 20:14:02 +00:00
|
|
|
#elif defined(__CC_ARM) && defined(__ARMCC_VERSION)
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_ARM_VERSION NLOHMANN_JSON_HEDLEY_VERSION_ENCODE(__ARMCC_VERSION / 1000000, (__ARMCC_VERSION % 1000000) / 10000, (__ARMCC_VERSION % 10000) / 100)
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
|
2019-07-01 20:24:39 +00:00
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_ARM_VERSION_CHECK)
|
|
|
|
#undef NLOHMANN_JSON_HEDLEY_ARM_VERSION_CHECK
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
2019-07-01 20:24:39 +00:00
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_ARM_VERSION)
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_ARM_VERSION_CHECK(major,minor,patch) (NLOHMANN_JSON_HEDLEY_ARM_VERSION >= NLOHMANN_JSON_HEDLEY_VERSION_ENCODE(major, minor, patch))
|
2019-06-30 20:14:02 +00:00
|
|
|
#else
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_ARM_VERSION_CHECK(major,minor,patch) (0)
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
|
2019-07-01 20:24:39 +00:00
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_IBM_VERSION)
|
|
|
|
#undef NLOHMANN_JSON_HEDLEY_IBM_VERSION
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
#if defined(__ibmxl__)
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_IBM_VERSION NLOHMANN_JSON_HEDLEY_VERSION_ENCODE(__ibmxl_version__, __ibmxl_release__, __ibmxl_modification__)
|
2019-06-30 20:14:02 +00:00
|
|
|
#elif defined(__xlC__) && defined(__xlC_ver__)
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_IBM_VERSION NLOHMANN_JSON_HEDLEY_VERSION_ENCODE(__xlC__ >> 8, __xlC__ & 0xff, (__xlC_ver__ >> 8) & 0xff)
|
2019-06-30 20:14:02 +00:00
|
|
|
#elif defined(__xlC__)
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_IBM_VERSION NLOHMANN_JSON_HEDLEY_VERSION_ENCODE(__xlC__ >> 8, __xlC__ & 0xff, 0)
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
|
2019-07-01 20:24:39 +00:00
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_IBM_VERSION_CHECK)
|
|
|
|
#undef NLOHMANN_JSON_HEDLEY_IBM_VERSION_CHECK
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
2019-07-01 20:24:39 +00:00
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_IBM_VERSION)
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_IBM_VERSION_CHECK(major,minor,patch) (NLOHMANN_JSON_HEDLEY_IBM_VERSION >= NLOHMANN_JSON_HEDLEY_VERSION_ENCODE(major, minor, patch))
|
2019-06-30 20:14:02 +00:00
|
|
|
#else
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_IBM_VERSION_CHECK(major,minor,patch) (0)
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
|
2019-07-01 20:24:39 +00:00
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_TI_VERSION)
|
|
|
|
#undef NLOHMANN_JSON_HEDLEY_TI_VERSION
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
#if defined(__TI_COMPILER_VERSION__)
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_TI_VERSION NLOHMANN_JSON_HEDLEY_VERSION_ENCODE(__TI_COMPILER_VERSION__ / 1000000, (__TI_COMPILER_VERSION__ % 1000000) / 1000, (__TI_COMPILER_VERSION__ % 1000))
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
|
2019-07-01 20:24:39 +00:00
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_TI_VERSION_CHECK)
|
|
|
|
#undef NLOHMANN_JSON_HEDLEY_TI_VERSION_CHECK
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
2019-07-01 20:24:39 +00:00
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_TI_VERSION)
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_TI_VERSION_CHECK(major,minor,patch) (NLOHMANN_JSON_HEDLEY_TI_VERSION >= NLOHMANN_JSON_HEDLEY_VERSION_ENCODE(major, minor, patch))
|
2019-06-30 20:14:02 +00:00
|
|
|
#else
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_TI_VERSION_CHECK(major,minor,patch) (0)
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
|
2019-07-01 20:24:39 +00:00
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_CRAY_VERSION)
|
|
|
|
#undef NLOHMANN_JSON_HEDLEY_CRAY_VERSION
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
#if defined(_CRAYC)
|
|
|
|
#if defined(_RELEASE_PATCHLEVEL)
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_CRAY_VERSION NLOHMANN_JSON_HEDLEY_VERSION_ENCODE(_RELEASE_MAJOR, _RELEASE_MINOR, _RELEASE_PATCHLEVEL)
|
2019-06-30 20:14:02 +00:00
|
|
|
#else
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_CRAY_VERSION NLOHMANN_JSON_HEDLEY_VERSION_ENCODE(_RELEASE_MAJOR, _RELEASE_MINOR, 0)
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
2019-07-01 20:24:39 +00:00
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_CRAY_VERSION_CHECK)
|
|
|
|
#undef NLOHMANN_JSON_HEDLEY_CRAY_VERSION_CHECK
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
2019-07-01 20:24:39 +00:00
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_CRAY_VERSION)
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_CRAY_VERSION_CHECK(major,minor,patch) (NLOHMANN_JSON_HEDLEY_CRAY_VERSION >= NLOHMANN_JSON_HEDLEY_VERSION_ENCODE(major, minor, patch))
|
2019-06-30 20:14:02 +00:00
|
|
|
#else
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_CRAY_VERSION_CHECK(major,minor,patch) (0)
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
|
2019-07-01 20:24:39 +00:00
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_IAR_VERSION)
|
|
|
|
#undef NLOHMANN_JSON_HEDLEY_IAR_VERSION
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
#if defined(__IAR_SYSTEMS_ICC__)
|
|
|
|
#if __VER__ > 1000
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_IAR_VERSION NLOHMANN_JSON_HEDLEY_VERSION_ENCODE((__VER__ / 1000000), ((__VER__ / 1000) % 1000), (__VER__ % 1000))
|
2019-06-30 20:14:02 +00:00
|
|
|
#else
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_IAR_VERSION NLOHMANN_JSON_HEDLEY_VERSION_ENCODE(VER / 100, __VER__ % 100, 0)
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
2019-07-01 20:24:39 +00:00
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_IAR_VERSION_CHECK)
|
|
|
|
#undef NLOHMANN_JSON_HEDLEY_IAR_VERSION_CHECK
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
2019-07-01 20:24:39 +00:00
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_IAR_VERSION)
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_IAR_VERSION_CHECK(major,minor,patch) (NLOHMANN_JSON_HEDLEY_IAR_VERSION >= NLOHMANN_JSON_HEDLEY_VERSION_ENCODE(major, minor, patch))
|
2019-06-30 20:14:02 +00:00
|
|
|
#else
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_IAR_VERSION_CHECK(major,minor,patch) (0)
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
|
2019-07-01 20:24:39 +00:00
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_TINYC_VERSION)
|
|
|
|
#undef NLOHMANN_JSON_HEDLEY_TINYC_VERSION
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
#if defined(__TINYC__)
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_TINYC_VERSION NLOHMANN_JSON_HEDLEY_VERSION_ENCODE(__TINYC__ / 1000, (__TINYC__ / 100) % 10, __TINYC__ % 100)
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
|
2019-07-01 20:24:39 +00:00
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_TINYC_VERSION_CHECK)
|
|
|
|
#undef NLOHMANN_JSON_HEDLEY_TINYC_VERSION_CHECK
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
2019-07-01 20:24:39 +00:00
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_TINYC_VERSION)
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_TINYC_VERSION_CHECK(major,minor,patch) (NLOHMANN_JSON_HEDLEY_TINYC_VERSION >= NLOHMANN_JSON_HEDLEY_VERSION_ENCODE(major, minor, patch))
|
2019-06-30 20:14:02 +00:00
|
|
|
#else
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_TINYC_VERSION_CHECK(major,minor,patch) (0)
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
|
2019-07-01 20:24:39 +00:00
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_DMC_VERSION)
|
|
|
|
#undef NLOHMANN_JSON_HEDLEY_DMC_VERSION
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
#if defined(__DMC__)
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_DMC_VERSION NLOHMANN_JSON_HEDLEY_VERSION_ENCODE(__DMC__ >> 8, (__DMC__ >> 4) & 0xf, __DMC__ & 0xf)
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
|
2019-07-01 20:24:39 +00:00
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_DMC_VERSION_CHECK)
|
|
|
|
#undef NLOHMANN_JSON_HEDLEY_DMC_VERSION_CHECK
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
2019-07-01 20:24:39 +00:00
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_DMC_VERSION)
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_DMC_VERSION_CHECK(major,minor,patch) (NLOHMANN_JSON_HEDLEY_DMC_VERSION >= NLOHMANN_JSON_HEDLEY_VERSION_ENCODE(major, minor, patch))
|
2019-06-30 20:14:02 +00:00
|
|
|
#else
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_DMC_VERSION_CHECK(major,minor,patch) (0)
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
|
2019-07-01 20:24:39 +00:00
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_COMPCERT_VERSION)
|
|
|
|
#undef NLOHMANN_JSON_HEDLEY_COMPCERT_VERSION
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
#if defined(__COMPCERT_VERSION__)
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_COMPCERT_VERSION NLOHMANN_JSON_HEDLEY_VERSION_ENCODE(__COMPCERT_VERSION__ / 10000, (__COMPCERT_VERSION__ / 100) % 100, __COMPCERT_VERSION__ % 100)
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
|
2019-07-01 20:24:39 +00:00
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_COMPCERT_VERSION_CHECK)
|
|
|
|
#undef NLOHMANN_JSON_HEDLEY_COMPCERT_VERSION_CHECK
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
2019-07-01 20:24:39 +00:00
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_COMPCERT_VERSION)
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_COMPCERT_VERSION_CHECK(major,minor,patch) (NLOHMANN_JSON_HEDLEY_COMPCERT_VERSION >= NLOHMANN_JSON_HEDLEY_VERSION_ENCODE(major, minor, patch))
|
2019-06-30 20:14:02 +00:00
|
|
|
#else
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_COMPCERT_VERSION_CHECK(major,minor,patch) (0)
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
|
2019-07-01 20:24:39 +00:00
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_PELLES_VERSION)
|
|
|
|
#undef NLOHMANN_JSON_HEDLEY_PELLES_VERSION
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
#if defined(__POCC__)
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_PELLES_VERSION NLOHMANN_JSON_HEDLEY_VERSION_ENCODE(__POCC__ / 100, __POCC__ % 100, 0)
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
|
2019-07-01 20:24:39 +00:00
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_PELLES_VERSION_CHECK)
|
|
|
|
#undef NLOHMANN_JSON_HEDLEY_PELLES_VERSION_CHECK
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
2019-07-01 20:24:39 +00:00
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_PELLES_VERSION)
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_PELLES_VERSION_CHECK(major,minor,patch) (NLOHMANN_JSON_HEDLEY_PELLES_VERSION >= NLOHMANN_JSON_HEDLEY_VERSION_ENCODE(major, minor, patch))
|
2019-06-30 20:14:02 +00:00
|
|
|
#else
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_PELLES_VERSION_CHECK(major,minor,patch) (0)
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
|
2019-07-01 20:24:39 +00:00
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_GCC_VERSION)
|
|
|
|
#undef NLOHMANN_JSON_HEDLEY_GCC_VERSION
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
#if \
|
2019-07-01 20:24:39 +00:00
|
|
|
defined(NLOHMANN_JSON_HEDLEY_GNUC_VERSION) && \
|
2019-06-30 20:14:02 +00:00
|
|
|
!defined(__clang__) && \
|
2019-07-01 20:24:39 +00:00
|
|
|
!defined(NLOHMANN_JSON_HEDLEY_INTEL_VERSION) && \
|
|
|
|
!defined(NLOHMANN_JSON_HEDLEY_PGI_VERSION) && \
|
|
|
|
!defined(NLOHMANN_JSON_HEDLEY_ARM_VERSION) && \
|
|
|
|
!defined(NLOHMANN_JSON_HEDLEY_TI_VERSION) && \
|
2019-06-30 20:14:02 +00:00
|
|
|
!defined(__COMPCERT__)
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_GCC_VERSION NLOHMANN_JSON_HEDLEY_GNUC_VERSION
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
|
2019-07-01 20:24:39 +00:00
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_GCC_VERSION_CHECK)
|
|
|
|
#undef NLOHMANN_JSON_HEDLEY_GCC_VERSION_CHECK
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
2019-07-01 20:24:39 +00:00
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_GCC_VERSION)
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch) (NLOHMANN_JSON_HEDLEY_GCC_VERSION >= NLOHMANN_JSON_HEDLEY_VERSION_ENCODE(major, minor, patch))
|
2019-06-30 20:14:02 +00:00
|
|
|
#else
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch) (0)
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
|
2019-07-01 20:24:39 +00:00
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_HAS_ATTRIBUTE)
|
|
|
|
#undef NLOHMANN_JSON_HEDLEY_HAS_ATTRIBUTE
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
#if defined(__has_attribute)
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_HAS_ATTRIBUTE(attribute) __has_attribute(attribute)
|
2019-06-30 20:14:02 +00:00
|
|
|
#else
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_HAS_ATTRIBUTE(attribute) (0)
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
|
2019-07-01 20:24:39 +00:00
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_GNUC_HAS_ATTRIBUTE)
|
|
|
|
#undef NLOHMANN_JSON_HEDLEY_GNUC_HAS_ATTRIBUTE
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
#if defined(__has_attribute)
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_GNUC_HAS_ATTRIBUTE(attribute,major,minor,patch) __has_attribute(attribute)
|
2019-06-30 20:14:02 +00:00
|
|
|
#else
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_GNUC_HAS_ATTRIBUTE(attribute,major,minor,patch) NLOHMANN_JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch)
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
|
2019-07-01 20:24:39 +00:00
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_GCC_HAS_ATTRIBUTE)
|
|
|
|
#undef NLOHMANN_JSON_HEDLEY_GCC_HAS_ATTRIBUTE
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
#if defined(__has_attribute)
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_GCC_HAS_ATTRIBUTE(attribute,major,minor,patch) __has_attribute(attribute)
|
2019-06-30 20:14:02 +00:00
|
|
|
#else
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_GCC_HAS_ATTRIBUTE(attribute,major,minor,patch) NLOHMANN_JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch)
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
|
2019-07-01 20:24:39 +00:00
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_HAS_CPP_ATTRIBUTE)
|
|
|
|
#undef NLOHMANN_JSON_HEDLEY_HAS_CPP_ATTRIBUTE
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
#if defined(__has_cpp_attribute) && defined(__cplusplus)
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_HAS_CPP_ATTRIBUTE(attribute) __has_cpp_attribute(attribute)
|
2019-06-30 20:14:02 +00:00
|
|
|
#else
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_HAS_CPP_ATTRIBUTE(attribute) (0)
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
|
2019-07-01 20:24:39 +00:00
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_GNUC_HAS_CPP_ATTRIBUTE)
|
|
|
|
#undef NLOHMANN_JSON_HEDLEY_GNUC_HAS_CPP_ATTRIBUTE
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
#if defined(__has_cpp_attribute) && defined(__cplusplus)
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_GNUC_HAS_CPP_ATTRIBUTE(attribute,major,minor,patch) __has_cpp_attribute(attribute)
|
2019-06-30 20:14:02 +00:00
|
|
|
#else
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_GNUC_HAS_CPP_ATTRIBUTE(attribute,major,minor,patch) NLOHMANN_JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch)
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
|
2019-07-01 20:24:39 +00:00
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_GCC_HAS_CPP_ATTRIBUTE)
|
|
|
|
#undef NLOHMANN_JSON_HEDLEY_GCC_HAS_CPP_ATTRIBUTE
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
#if defined(__has_cpp_attribute) && defined(__cplusplus)
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_GCC_HAS_CPP_ATTRIBUTE(attribute,major,minor,patch) __has_cpp_attribute(attribute)
|
2019-06-30 20:14:02 +00:00
|
|
|
#else
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_GCC_HAS_CPP_ATTRIBUTE(attribute,major,minor,patch) NLOHMANN_JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch)
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
|
2019-07-01 20:24:39 +00:00
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_HAS_BUILTIN)
|
|
|
|
#undef NLOHMANN_JSON_HEDLEY_HAS_BUILTIN
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
#if defined(__has_builtin)
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_HAS_BUILTIN(builtin) __has_builtin(builtin)
|
2019-06-30 20:14:02 +00:00
|
|
|
#else
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_HAS_BUILTIN(builtin) (0)
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
|
2019-07-01 20:24:39 +00:00
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_GNUC_HAS_BUILTIN)
|
|
|
|
#undef NLOHMANN_JSON_HEDLEY_GNUC_HAS_BUILTIN
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
#if defined(__has_builtin)
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_GNUC_HAS_BUILTIN(builtin,major,minor,patch) __has_builtin(builtin)
|
2019-06-30 20:14:02 +00:00
|
|
|
#else
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_GNUC_HAS_BUILTIN(builtin,major,minor,patch) NLOHMANN_JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch)
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
|
2019-07-01 20:24:39 +00:00
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_GCC_HAS_BUILTIN)
|
|
|
|
#undef NLOHMANN_JSON_HEDLEY_GCC_HAS_BUILTIN
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
#if defined(__has_builtin)
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_GCC_HAS_BUILTIN(builtin,major,minor,patch) __has_builtin(builtin)
|
2019-06-30 20:14:02 +00:00
|
|
|
#else
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_GCC_HAS_BUILTIN(builtin,major,minor,patch) NLOHMANN_JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch)
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
|
2019-07-01 20:24:39 +00:00
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_HAS_FEATURE)
|
|
|
|
#undef NLOHMANN_JSON_HEDLEY_HAS_FEATURE
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
#if defined(__has_feature)
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_HAS_FEATURE(feature) __has_feature(feature)
|
2019-06-30 20:14:02 +00:00
|
|
|
#else
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_HAS_FEATURE(feature) (0)
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
|
2019-07-01 20:24:39 +00:00
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_GNUC_HAS_FEATURE)
|
|
|
|
#undef NLOHMANN_JSON_HEDLEY_GNUC_HAS_FEATURE
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
#if defined(__has_feature)
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_GNUC_HAS_FEATURE(feature,major,minor,patch) __has_feature(feature)
|
2019-06-30 20:14:02 +00:00
|
|
|
#else
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_GNUC_HAS_FEATURE(feature,major,minor,patch) NLOHMANN_JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch)
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
|
2019-07-01 20:24:39 +00:00
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_GCC_HAS_FEATURE)
|
|
|
|
#undef NLOHMANN_JSON_HEDLEY_GCC_HAS_FEATURE
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
#if defined(__has_feature)
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_GCC_HAS_FEATURE(feature,major,minor,patch) __has_feature(feature)
|
2019-06-30 20:14:02 +00:00
|
|
|
#else
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_GCC_HAS_FEATURE(feature,major,minor,patch) NLOHMANN_JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch)
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
|
2019-07-01 20:24:39 +00:00
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_HAS_EXTENSION)
|
|
|
|
#undef NLOHMANN_JSON_HEDLEY_HAS_EXTENSION
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
#if defined(__has_extension)
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_HAS_EXTENSION(extension) __has_extension(extension)
|
2019-06-30 20:14:02 +00:00
|
|
|
#else
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_HAS_EXTENSION(extension) (0)
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
|
2019-07-01 20:24:39 +00:00
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_GNUC_HAS_EXTENSION)
|
|
|
|
#undef NLOHMANN_JSON_HEDLEY_GNUC_HAS_EXTENSION
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
#if defined(__has_extension)
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_GNUC_HAS_EXTENSION(extension,major,minor,patch) __has_extension(extension)
|
2019-06-30 20:14:02 +00:00
|
|
|
#else
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_GNUC_HAS_EXTENSION(extension,major,minor,patch) NLOHMANN_JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch)
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
|
2019-07-01 20:24:39 +00:00
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_GCC_HAS_EXTENSION)
|
|
|
|
#undef NLOHMANN_JSON_HEDLEY_GCC_HAS_EXTENSION
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
#if defined(__has_extension)
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_GCC_HAS_EXTENSION(extension,major,minor,patch) __has_extension(extension)
|
2019-06-30 20:14:02 +00:00
|
|
|
#else
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_GCC_HAS_EXTENSION(extension,major,minor,patch) NLOHMANN_JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch)
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
|
2019-07-01 20:24:39 +00:00
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_HAS_DECLSPEC_ATTRIBUTE)
|
|
|
|
#undef NLOHMANN_JSON_HEDLEY_HAS_DECLSPEC_ATTRIBUTE
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
#if defined(__has_declspec_attribute)
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_HAS_DECLSPEC_ATTRIBUTE(attribute) __has_declspec_attribute(attribute)
|
2019-06-30 20:14:02 +00:00
|
|
|
#else
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_HAS_DECLSPEC_ATTRIBUTE(attribute) (0)
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
|
2019-07-01 20:24:39 +00:00
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_GNUC_HAS_DECLSPEC_ATTRIBUTE)
|
|
|
|
#undef NLOHMANN_JSON_HEDLEY_GNUC_HAS_DECLSPEC_ATTRIBUTE
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
#if defined(__has_declspec_attribute)
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_GNUC_HAS_DECLSPEC_ATTRIBUTE(attribute,major,minor,patch) __has_declspec_attribute(attribute)
|
2019-06-30 20:14:02 +00:00
|
|
|
#else
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_GNUC_HAS_DECLSPEC_ATTRIBUTE(attribute,major,minor,patch) NLOHMANN_JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch)
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
|
2019-07-01 20:24:39 +00:00
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_GCC_HAS_DECLSPEC_ATTRIBUTE)
|
|
|
|
#undef NLOHMANN_JSON_HEDLEY_GCC_HAS_DECLSPEC_ATTRIBUTE
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
#if defined(__has_declspec_attribute)
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_GCC_HAS_DECLSPEC_ATTRIBUTE(attribute,major,minor,patch) __has_declspec_attribute(attribute)
|
2019-06-30 20:14:02 +00:00
|
|
|
#else
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_GCC_HAS_DECLSPEC_ATTRIBUTE(attribute,major,minor,patch) NLOHMANN_JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch)
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
|
2019-07-01 20:24:39 +00:00
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_HAS_WARNING)
|
|
|
|
#undef NLOHMANN_JSON_HEDLEY_HAS_WARNING
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
#if defined(__has_warning)
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_HAS_WARNING(warning) __has_warning(warning)
|
2019-06-30 20:14:02 +00:00
|
|
|
#else
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_HAS_WARNING(warning) (0)
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
|
2019-07-01 20:24:39 +00:00
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_GNUC_HAS_WARNING)
|
|
|
|
#undef NLOHMANN_JSON_HEDLEY_GNUC_HAS_WARNING
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
#if defined(__has_warning)
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_GNUC_HAS_WARNING(warning,major,minor,patch) __has_warning(warning)
|
2019-06-30 20:14:02 +00:00
|
|
|
#else
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_GNUC_HAS_WARNING(warning,major,minor,patch) NLOHMANN_JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch)
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
|
2019-07-01 20:24:39 +00:00
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_GCC_HAS_WARNING)
|
|
|
|
#undef NLOHMANN_JSON_HEDLEY_GCC_HAS_WARNING
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
#if defined(__has_warning)
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_GCC_HAS_WARNING(warning,major,minor,patch) __has_warning(warning)
|
2019-06-30 20:14:02 +00:00
|
|
|
#else
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_GCC_HAS_WARNING(warning,major,minor,patch) NLOHMANN_JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch)
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#if \
|
|
|
|
(defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)) || \
|
|
|
|
defined(__clang__) || \
|
2019-07-01 20:24:39 +00:00
|
|
|
NLOHMANN_JSON_HEDLEY_GCC_VERSION_CHECK(3,0,0) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_PGI_VERSION_CHECK(18,4,0) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_TI_VERSION_CHECK(6,0,0) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_CRAY_VERSION_CHECK(5,0,0) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_TINYC_VERSION_CHECK(0,9,17) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_SUNPRO_VERSION_CHECK(8,0,0) || \
|
|
|
|
(NLOHMANN_JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0) && defined(__C99_PRAGMA_OPERATOR))
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_PRAGMA(value) _Pragma(#value)
|
|
|
|
#elif NLOHMANN_JSON_HEDLEY_MSVC_VERSION_CHECK(15,0,0)
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_PRAGMA(value) __pragma(value)
|
2019-06-30 20:14:02 +00:00
|
|
|
#else
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_PRAGMA(value)
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
|
2019-07-01 20:24:39 +00:00
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_DIAGNOSTIC_PUSH)
|
|
|
|
#undef NLOHMANN_JSON_HEDLEY_DIAGNOSTIC_PUSH
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
2019-07-01 20:24:39 +00:00
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_DIAGNOSTIC_POP)
|
|
|
|
#undef NLOHMANN_JSON_HEDLEY_DIAGNOSTIC_POP
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
#if defined(__clang__)
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_DIAGNOSTIC_PUSH _Pragma("clang diagnostic push")
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_DIAGNOSTIC_POP _Pragma("clang diagnostic pop")
|
|
|
|
#elif NLOHMANN_JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0)
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_DIAGNOSTIC_PUSH _Pragma("warning(push)")
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_DIAGNOSTIC_POP _Pragma("warning(pop)")
|
|
|
|
#elif NLOHMANN_JSON_HEDLEY_GCC_VERSION_CHECK(4,6,0)
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_DIAGNOSTIC_PUSH _Pragma("GCC diagnostic push")
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_DIAGNOSTIC_POP _Pragma("GCC diagnostic pop")
|
|
|
|
#elif NLOHMANN_JSON_HEDLEY_MSVC_VERSION_CHECK(15,0,0)
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_DIAGNOSTIC_PUSH __pragma(warning(push))
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_DIAGNOSTIC_POP __pragma(warning(pop))
|
|
|
|
#elif NLOHMANN_JSON_HEDLEY_ARM_VERSION_CHECK(5,6,0)
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_DIAGNOSTIC_PUSH _Pragma("push")
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_DIAGNOSTIC_POP _Pragma("pop")
|
|
|
|
#elif NLOHMANN_JSON_HEDLEY_TI_VERSION_CHECK(8,1,0)
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_DIAGNOSTIC_PUSH _Pragma("diag_push")
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_DIAGNOSTIC_POP _Pragma("diag_pop")
|
|
|
|
#elif NLOHMANN_JSON_HEDLEY_PELLES_VERSION_CHECK(2,90,0)
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_DIAGNOSTIC_PUSH _Pragma("warning(push)")
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_DIAGNOSTIC_POP _Pragma("warning(pop)")
|
|
|
|
#else
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_DIAGNOSTIC_PUSH
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_DIAGNOSTIC_POP
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED)
|
|
|
|
#undef NLOHMANN_JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED
|
|
|
|
#endif
|
|
|
|
#if NLOHMANN_JSON_HEDLEY_HAS_WARNING("-Wdeprecated-declarations")
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("clang diagnostic ignored \"-Wdeprecated-declarations\"")
|
|
|
|
#elif NLOHMANN_JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0)
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("warning(disable:1478 1786)")
|
|
|
|
#elif NLOHMANN_JSON_HEDLEY_PGI_VERSION_CHECK(17,10,0)
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("diag_suppress 1215,1444")
|
|
|
|
#elif NLOHMANN_JSON_HEDLEY_GCC_VERSION_CHECK(4,3,0)
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"")
|
|
|
|
#elif NLOHMANN_JSON_HEDLEY_MSVC_VERSION_CHECK(15,0,0)
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED __pragma(warning(disable:4996))
|
|
|
|
#elif NLOHMANN_JSON_HEDLEY_TI_VERSION_CHECK(8,0,0)
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("diag_suppress 1291,1718")
|
|
|
|
#elif NLOHMANN_JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,13,0) && !defined(__cplusplus)
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("error_messages(off,E_DEPRECATED_ATT,E_DEPRECATED_ATT_MESS)")
|
|
|
|
#elif NLOHMANN_JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,13,0) && defined(__cplusplus)
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("error_messages(off,symdeprecated,symdeprecated2)")
|
|
|
|
#elif NLOHMANN_JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0)
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("diag_suppress=Pe1444,Pe1215")
|
|
|
|
#elif NLOHMANN_JSON_HEDLEY_PELLES_VERSION_CHECK(2,90,0)
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("warn(disable:2241)")
|
|
|
|
#else
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS)
|
|
|
|
#undef NLOHMANN_JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS
|
|
|
|
#endif
|
|
|
|
#if NLOHMANN_JSON_HEDLEY_HAS_WARNING("-Wunknown-pragmas")
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma("clang diagnostic ignored \"-Wunknown-pragmas\"")
|
|
|
|
#elif NLOHMANN_JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0)
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma("warning(disable:161)")
|
|
|
|
#elif NLOHMANN_JSON_HEDLEY_PGI_VERSION_CHECK(17,10,0)
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma("diag_suppress 1675")
|
|
|
|
#elif NLOHMANN_JSON_HEDLEY_GCC_VERSION_CHECK(4,3,0)
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma("GCC diagnostic ignored \"-Wunknown-pragmas\"")
|
|
|
|
#elif NLOHMANN_JSON_HEDLEY_MSVC_VERSION_CHECK(15,0,0)
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS __pragma(warning(disable:4068))
|
|
|
|
#elif NLOHMANN_JSON_HEDLEY_TI_VERSION_CHECK(8,0,0)
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma("diag_suppress 163")
|
|
|
|
#elif NLOHMANN_JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0)
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma("diag_suppress=Pe161")
|
|
|
|
#else
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL)
|
|
|
|
#undef NLOHMANN_JSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL
|
|
|
|
#endif
|
|
|
|
#if NLOHMANN_JSON_HEDLEY_HAS_WARNING("-Wcast-qual")
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL _Pragma("clang diagnostic ignored \"-Wcast-qual\"")
|
|
|
|
#elif NLOHMANN_JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0)
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL _Pragma("warning(disable:2203 2331)")
|
|
|
|
#elif NLOHMANN_JSON_HEDLEY_GCC_VERSION_CHECK(3,0,0)
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL _Pragma("GCC diagnostic ignored \"-Wcast-qual\"")
|
|
|
|
#else
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_DEPRECATED)
|
|
|
|
#undef NLOHMANN_JSON_HEDLEY_DEPRECATED
|
|
|
|
#endif
|
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_DEPRECATED_FOR)
|
|
|
|
#undef NLOHMANN_JSON_HEDLEY_DEPRECATED_FOR
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
#if defined(__cplusplus) && (__cplusplus >= 201402L)
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_DEPRECATED(since) [[deprecated("Since " #since)]]
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_DEPRECATED_FOR(since, replacement) [[deprecated("Since " #since "; use " #replacement)]]
|
2019-06-30 20:14:02 +00:00
|
|
|
#elif \
|
2019-07-01 20:24:39 +00:00
|
|
|
NLOHMANN_JSON_HEDLEY_HAS_EXTENSION(attribute_deprecated_with_message) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_GCC_VERSION_CHECK(4,5,0) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_ARM_VERSION_CHECK(5,6,0) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,13,0) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_PGI_VERSION_CHECK(17,10,0) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_TI_VERSION_CHECK(8,3,0)
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_DEPRECATED(since) __attribute__((__deprecated__("Since " #since)))
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_DEPRECATED_FOR(since, replacement) __attribute__((__deprecated__("Since " #since "; use " #replacement)))
|
2019-06-30 20:14:02 +00:00
|
|
|
#elif \
|
2019-07-01 20:24:39 +00:00
|
|
|
NLOHMANN_JSON_HEDLEY_HAS_ATTRIBUTE(deprecated) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_GCC_VERSION_CHECK(3,1,0) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_TI_VERSION_CHECK(8,0,0) || \
|
|
|
|
(NLOHMANN_JSON_HEDLEY_TI_VERSION_CHECK(7,3,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__))
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_DEPRECATED(since) __attribute__((__deprecated__))
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_DEPRECATED_FOR(since, replacement) __attribute__((__deprecated__))
|
|
|
|
#elif NLOHMANN_JSON_HEDLEY_MSVC_VERSION_CHECK(14,0,0)
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_DEPRECATED(since) __declspec(deprecated("Since " # since))
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_DEPRECATED_FOR(since, replacement) __declspec(deprecated("Since " #since "; use " #replacement))
|
2019-06-30 20:14:02 +00:00
|
|
|
#elif \
|
2019-07-01 20:24:39 +00:00
|
|
|
NLOHMANN_JSON_HEDLEY_MSVC_VERSION_CHECK(13,10,0) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_PELLES_VERSION_CHECK(6,50,0)
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_DEPRECATED(since) _declspec(deprecated)
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_DEPRECATED_FOR(since, replacement) __declspec(deprecated)
|
|
|
|
#elif NLOHMANN_JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0)
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_DEPRECATED(since) _Pragma("deprecated")
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_DEPRECATED_FOR(since, replacement) _Pragma("deprecated")
|
2019-06-30 20:14:02 +00:00
|
|
|
#else
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_DEPRECATED(since)
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_DEPRECATED_FOR(since, replacement)
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
|
2019-07-01 20:24:39 +00:00
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_UNAVAILABLE)
|
|
|
|
#undef NLOHMANN_JSON_HEDLEY_UNAVAILABLE
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
#if \
|
2019-07-01 20:24:39 +00:00
|
|
|
NLOHMANN_JSON_HEDLEY_HAS_ATTRIBUTE(warning) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_GCC_VERSION_CHECK(4,3,0) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0)
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_UNAVAILABLE(available_since) __attribute__((__warning__("Not available until " #available_since)))
|
2019-06-30 20:14:02 +00:00
|
|
|
#else
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_UNAVAILABLE(available_since)
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
|
2019-07-01 20:24:39 +00:00
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_WARN_UNUSED_RESULT)
|
|
|
|
#undef NLOHMANN_JSON_HEDLEY_WARN_UNUSED_RESULT
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
#if defined(__cplusplus) && (__cplusplus >= 201703L)
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_WARN_UNUSED_RESULT [[nodiscard]]
|
2019-06-30 20:14:02 +00:00
|
|
|
#elif \
|
2019-07-01 20:24:39 +00:00
|
|
|
NLOHMANN_JSON_HEDLEY_HAS_ATTRIBUTE(warn_unused_result) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_GCC_VERSION_CHECK(3,4,0) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_TI_VERSION_CHECK(8,0,0) || \
|
|
|
|
(NLOHMANN_JSON_HEDLEY_TI_VERSION_CHECK(7,3,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \
|
|
|
|
(NLOHMANN_JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,15,0) && defined(__cplusplus)) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_PGI_VERSION_CHECK(17,10,0)
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_WARN_UNUSED_RESULT __attribute__((__warn_unused_result__))
|
2019-06-30 20:14:02 +00:00
|
|
|
#elif defined(_Check_return_) /* SAL */
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_WARN_UNUSED_RESULT _Check_return_
|
2019-06-30 20:14:02 +00:00
|
|
|
#else
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_WARN_UNUSED_RESULT
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
|
2019-07-01 20:24:39 +00:00
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_SENTINEL)
|
|
|
|
#undef NLOHMANN_JSON_HEDLEY_SENTINEL
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
#if \
|
2019-07-01 20:24:39 +00:00
|
|
|
NLOHMANN_JSON_HEDLEY_HAS_ATTRIBUTE(sentinel) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_GCC_VERSION_CHECK(4,0,0) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_ARM_VERSION_CHECK(5,4,0)
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_SENTINEL(position) __attribute__((__sentinel__(position)))
|
2019-06-30 20:14:02 +00:00
|
|
|
#else
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_SENTINEL(position)
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
|
2019-07-01 20:24:39 +00:00
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_NO_RETURN)
|
|
|
|
#undef NLOHMANN_JSON_HEDLEY_NO_RETURN
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
2019-07-01 20:24:39 +00:00
|
|
|
#if NLOHMANN_JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0)
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_NO_RETURN __noreturn
|
|
|
|
#elif NLOHMANN_JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0)
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_NO_RETURN __attribute__((__noreturn__))
|
2019-06-30 20:14:02 +00:00
|
|
|
#elif defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_NO_RETURN _Noreturn
|
2019-06-30 20:14:02 +00:00
|
|
|
#elif defined(__cplusplus) && (__cplusplus >= 201103L)
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_NO_RETURN [[noreturn]]
|
2019-06-30 20:14:02 +00:00
|
|
|
#elif \
|
2019-07-01 20:24:39 +00:00
|
|
|
NLOHMANN_JSON_HEDLEY_HAS_ATTRIBUTE(noreturn) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_GCC_VERSION_CHECK(3,2,0) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,11,0) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_TI_VERSION_CHECK(18,0,0) || \
|
|
|
|
(NLOHMANN_JSON_HEDLEY_TI_VERSION_CHECK(17,3,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__))
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_NO_RETURN __attribute__((__noreturn__))
|
|
|
|
#elif NLOHMANN_JSON_HEDLEY_MSVC_VERSION_CHECK(13,10,0)
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_NO_RETURN __declspec(noreturn)
|
|
|
|
#elif NLOHMANN_JSON_HEDLEY_TI_VERSION_CHECK(6,0,0) && defined(__cplusplus)
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_NO_RETURN _Pragma("FUNC_NEVER_RETURNS;")
|
|
|
|
#elif NLOHMANN_JSON_HEDLEY_COMPCERT_VERSION_CHECK(3,2,0)
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_NO_RETURN __attribute((noreturn))
|
|
|
|
#elif NLOHMANN_JSON_HEDLEY_PELLES_VERSION_CHECK(9,0,0)
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_NO_RETURN __declspec(noreturn)
|
|
|
|
#else
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_NO_RETURN
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_UNREACHABLE)
|
|
|
|
#undef NLOHMANN_JSON_HEDLEY_UNREACHABLE
|
|
|
|
#endif
|
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_UNREACHABLE_RETURN)
|
|
|
|
#undef NLOHMANN_JSON_HEDLEY_UNREACHABLE_RETURN
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
#if \
|
2019-07-01 20:24:39 +00:00
|
|
|
(NLOHMANN_JSON_HEDLEY_HAS_BUILTIN(__builtin_unreachable) && (!defined(NLOHMANN_JSON_HEDLEY_ARM_VERSION))) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_GCC_VERSION_CHECK(4,5,0) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_IBM_VERSION_CHECK(13,1,5)
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_UNREACHABLE() __builtin_unreachable()
|
|
|
|
#elif NLOHMANN_JSON_HEDLEY_MSVC_VERSION_CHECK(13,10,0)
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_UNREACHABLE() __assume(0)
|
|
|
|
#elif NLOHMANN_JSON_HEDLEY_TI_VERSION_CHECK(6,0,0)
|
2019-06-30 20:14:02 +00:00
|
|
|
#if defined(__cplusplus)
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_UNREACHABLE() std::_nassert(0)
|
2019-06-30 20:14:02 +00:00
|
|
|
#else
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_UNREACHABLE() _nassert(0)
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_UNREACHABLE_RETURN(value) return value
|
2019-06-30 20:14:02 +00:00
|
|
|
#elif defined(EXIT_FAILURE)
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_UNREACHABLE() abort()
|
2019-06-30 20:14:02 +00:00
|
|
|
#else
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_UNREACHABLE()
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_UNREACHABLE_RETURN(value) return value
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
2019-07-01 20:24:39 +00:00
|
|
|
#if !defined(NLOHMANN_JSON_HEDLEY_UNREACHABLE_RETURN)
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_UNREACHABLE_RETURN(value) NLOHMANN_JSON_HEDLEY_UNREACHABLE()
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
|
2019-07-01 20:24:39 +00:00
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_ASSUME)
|
|
|
|
#undef NLOHMANN_JSON_HEDLEY_ASSUME
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
#if \
|
2019-07-01 20:24:39 +00:00
|
|
|
NLOHMANN_JSON_HEDLEY_MSVC_VERSION_CHECK(13,10,0) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0)
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_ASSUME(expr) __assume(expr)
|
|
|
|
#elif NLOHMANN_JSON_HEDLEY_HAS_BUILTIN(__builtin_assume)
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_ASSUME(expr) __builtin_assume(expr)
|
|
|
|
#elif NLOHMANN_JSON_HEDLEY_TI_VERSION_CHECK(6,0,0)
|
2019-06-30 20:14:02 +00:00
|
|
|
#if defined(__cplusplus)
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_ASSUME(expr) std::_nassert(expr)
|
2019-06-30 20:14:02 +00:00
|
|
|
#else
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_ASSUME(expr) _nassert(expr)
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
#elif \
|
2019-07-01 20:24:39 +00:00
|
|
|
(NLOHMANN_JSON_HEDLEY_HAS_BUILTIN(__builtin_unreachable) && !defined(NLOHMANN_JSON_HEDLEY_ARM_VERSION)) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_GCC_VERSION_CHECK(4,5,0) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_IBM_VERSION_CHECK(13,1,5)
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_ASSUME(expr) ((void) ((expr) ? 1 : (__builtin_unreachable(), 1)))
|
2019-06-30 20:14:02 +00:00
|
|
|
#else
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_ASSUME(expr) ((void) (expr))
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
|
2019-07-01 20:24:39 +00:00
|
|
|
NLOHMANN_JSON_HEDLEY_DIAGNOSTIC_PUSH
|
2019-06-30 20:14:02 +00:00
|
|
|
#if \
|
2019-07-01 20:24:39 +00:00
|
|
|
NLOHMANN_JSON_HEDLEY_HAS_WARNING("-Wvariadic-macros") || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_GCC_VERSION_CHECK(4,0,0)
|
2019-06-30 20:14:02 +00:00
|
|
|
#if defined(__clang__)
|
|
|
|
#pragma clang diagnostic ignored "-Wvariadic-macros"
|
2019-07-01 20:24:39 +00:00
|
|
|
#elif defined(NLOHMANN_JSON_HEDLEY_GCC_VERSION)
|
2019-06-30 20:14:02 +00:00
|
|
|
#pragma GCC diagnostic ignored "-Wvariadic-macros"
|
|
|
|
#endif
|
|
|
|
#endif
|
2019-07-01 20:24:39 +00:00
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_NON_NULL)
|
|
|
|
#undef NLOHMANN_JSON_HEDLEY_NON_NULL
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
#if \
|
2019-07-01 20:24:39 +00:00
|
|
|
NLOHMANN_JSON_HEDLEY_HAS_ATTRIBUTE(nonnull) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_GCC_VERSION_CHECK(3,3,0) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0)
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_NON_NULL(...) __attribute__((__nonnull__(__VA_ARGS__)))
|
2019-06-30 20:14:02 +00:00
|
|
|
#else
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_NON_NULL(...)
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
2019-07-01 20:24:39 +00:00
|
|
|
NLOHMANN_JSON_HEDLEY_DIAGNOSTIC_POP
|
2019-06-30 20:14:02 +00:00
|
|
|
|
2019-07-01 20:24:39 +00:00
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_PRINTF_FORMAT)
|
|
|
|
#undef NLOHMANN_JSON_HEDLEY_PRINTF_FORMAT
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
2019-07-01 20:24:39 +00:00
|
|
|
#if defined(__MINGW32__) && NLOHMANN_JSON_HEDLEY_GCC_HAS_ATTRIBUTE(format,4,4,0) && !defined(__USE_MINGW_ANSI_STDIO)
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_PRINTF_FORMAT(string_idx,first_to_check) __attribute__((__format__(ms_printf, string_idx, first_to_check)))
|
|
|
|
#elif defined(__MINGW32__) && NLOHMANN_JSON_HEDLEY_GCC_HAS_ATTRIBUTE(format,4,4,0) && defined(__USE_MINGW_ANSI_STDIO)
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_PRINTF_FORMAT(string_idx,first_to_check) __attribute__((__format__(gnu_printf, string_idx, first_to_check)))
|
2019-06-30 20:14:02 +00:00
|
|
|
#elif \
|
2019-07-01 20:24:39 +00:00
|
|
|
NLOHMANN_JSON_HEDLEY_HAS_ATTRIBUTE(format) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_GCC_VERSION_CHECK(3,1,0) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_ARM_VERSION_CHECK(5,6,0) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_TI_VERSION_CHECK(8,0,0) || \
|
|
|
|
(NLOHMANN_JSON_HEDLEY_TI_VERSION_CHECK(7,3,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__))
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_PRINTF_FORMAT(string_idx,first_to_check) __attribute__((__format__(__printf__, string_idx, first_to_check)))
|
|
|
|
#elif NLOHMANN_JSON_HEDLEY_PELLES_VERSION_CHECK(6,0,0)
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_PRINTF_FORMAT(string_idx,first_to_check) __declspec(vaformat(printf,string_idx,first_to_check))
|
2019-06-30 20:14:02 +00:00
|
|
|
#else
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_PRINTF_FORMAT(string_idx,first_to_check)
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
|
2019-07-01 20:24:39 +00:00
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_CONSTEXPR)
|
|
|
|
#undef NLOHMANN_JSON_HEDLEY_CONSTEXPR
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
#if defined(__cplusplus)
|
|
|
|
#if __cplusplus >= 201103L
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_CONSTEXPR constexpr
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
#endif
|
2019-07-01 20:24:39 +00:00
|
|
|
#if !defined(NLOHMANN_JSON_HEDLEY_CONSTEXPR)
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_CONSTEXPR
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
|
2019-07-01 20:24:39 +00:00
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_PREDICT)
|
|
|
|
#undef NLOHMANN_JSON_HEDLEY_PREDICT
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
2019-07-01 20:24:39 +00:00
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_LIKELY)
|
|
|
|
#undef NLOHMANN_JSON_HEDLEY_LIKELY
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
2019-07-01 20:24:39 +00:00
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_UNLIKELY)
|
|
|
|
#undef NLOHMANN_JSON_HEDLEY_UNLIKELY
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
2019-07-01 20:24:39 +00:00
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_UNPREDICTABLE)
|
|
|
|
#undef NLOHMANN_JSON_HEDLEY_UNPREDICTABLE
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
2019-07-01 20:24:39 +00:00
|
|
|
#if NLOHMANN_JSON_HEDLEY_HAS_BUILTIN(__builtin_unpredictable)
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_UNPREDICTABLE(expr) __builtin_unpredictable(!!(expr))
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
#if \
|
2019-07-01 20:24:39 +00:00
|
|
|
NLOHMANN_JSON_HEDLEY_HAS_BUILTIN(__builtin_expect_with_probability) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_GCC_VERSION_CHECK(9,0,0)
|
|
|
|
# define NLOHMANN_JSON_HEDLEY_PREDICT(expr, value, probability) __builtin_expect_with_probability(expr, value, probability)
|
|
|
|
# define NLOHMANN_JSON_HEDLEY_PREDICT_TRUE(expr, probability) __builtin_expect_with_probability(!!(expr), 1, probability)
|
|
|
|
# define NLOHMANN_JSON_HEDLEY_PREDICT_FALSE(expr, probability) __builtin_expect_with_probability(!!(expr), 0, probability)
|
|
|
|
# define NLOHMANN_JSON_HEDLEY_LIKELY(expr) __builtin_expect(!!(expr), 1)
|
|
|
|
# define NLOHMANN_JSON_HEDLEY_UNLIKELY(expr) __builtin_expect(!!(expr), 0)
|
|
|
|
#if !defined(NLOHMANN_JSON_HEDLEY_BUILTIN_UNPREDICTABLE)
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_BUILTIN_UNPREDICTABLE(expr) __builtin_expect_with_probability(!!(expr), 1, 0.5)
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
#elif \
|
2019-07-01 20:24:39 +00:00
|
|
|
NLOHMANN_JSON_HEDLEY_HAS_BUILTIN(__builtin_expect) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_GCC_VERSION_CHECK(3,0,0) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \
|
|
|
|
(NLOHMANN_JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,15,0) && defined(__cplusplus)) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_TI_VERSION_CHECK(6,1,0) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_TINYC_VERSION_CHECK(0,9,27)
|
|
|
|
# define NLOHMANN_JSON_HEDLEY_PREDICT(expr, expected, probability) \
|
2019-06-30 20:14:02 +00:00
|
|
|
(((probability) >= 0.9) ? __builtin_expect(!!(expr), (expected)) : (((void) (expected)), !!(expr)))
|
2019-07-01 20:24:39 +00:00
|
|
|
# define NLOHMANN_JSON_HEDLEY_PREDICT_TRUE(expr, probability) \
|
2019-06-30 20:14:02 +00:00
|
|
|
(__extension__ ({ \
|
2019-07-01 20:24:39 +00:00
|
|
|
NLOHMANN_JSON_HEDLEY_CONSTEXPR double hedley_probability_ = (probability); \
|
2019-06-30 20:14:02 +00:00
|
|
|
((hedley_probability_ >= 0.9) ? __builtin_expect(!!(expr), 1) : ((hedley_probability_ <= 0.1) ? __builtin_expect(!!(expr), 0) : !!(expr))); \
|
|
|
|
}))
|
2019-07-01 20:24:39 +00:00
|
|
|
# define NLOHMANN_JSON_HEDLEY_PREDICT_FALSE(expr, probability) \
|
2019-06-30 20:14:02 +00:00
|
|
|
(__extension__ ({ \
|
2019-07-01 20:24:39 +00:00
|
|
|
NLOHMANN_JSON_HEDLEY_CONSTEXPR double hedley_probability_ = (probability); \
|
2019-06-30 20:14:02 +00:00
|
|
|
((hedley_probability_ >= 0.9) ? __builtin_expect(!!(expr), 0) : ((hedley_probability_ <= 0.1) ? __builtin_expect(!!(expr), 1) : !!(expr))); \
|
|
|
|
}))
|
2019-07-01 20:24:39 +00:00
|
|
|
# define NLOHMANN_JSON_HEDLEY_LIKELY(expr) __builtin_expect(!!(expr), 1)
|
|
|
|
# define NLOHMANN_JSON_HEDLEY_UNLIKELY(expr) __builtin_expect(!!(expr), 0)
|
2019-06-30 20:14:02 +00:00
|
|
|
#else
|
2019-07-01 20:24:39 +00:00
|
|
|
# define NLOHMANN_JSON_HEDLEY_PREDICT(expr, expected, probability) (((void) (expected)), !!(expr))
|
|
|
|
# define NLOHMANN_JSON_HEDLEY_PREDICT_TRUE(expr, probability) (!!(expr))
|
|
|
|
# define NLOHMANN_JSON_HEDLEY_PREDICT_FALSE(expr, probability) (!!(expr))
|
|
|
|
# define NLOHMANN_JSON_HEDLEY_LIKELY(expr) (!!(expr))
|
|
|
|
# define NLOHMANN_JSON_HEDLEY_UNLIKELY(expr) (!!(expr))
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
2019-07-01 20:24:39 +00:00
|
|
|
#if !defined(NLOHMANN_JSON_HEDLEY_UNPREDICTABLE)
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_UNPREDICTABLE(expr) NLOHMANN_JSON_HEDLEY_PREDICT(expr, 1, 0.5)
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
|
2019-07-01 20:24:39 +00:00
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_MALLOC)
|
|
|
|
#undef NLOHMANN_JSON_HEDLEY_MALLOC
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
#if \
|
2019-07-01 20:24:39 +00:00
|
|
|
NLOHMANN_JSON_HEDLEY_HAS_ATTRIBUTE(malloc) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_GCC_VERSION_CHECK(3,1,0) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,11,0) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_IBM_VERSION_CHECK(12,1,0) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_TI_VERSION_CHECK(8,0,0) || \
|
|
|
|
(NLOHMANN_JSON_HEDLEY_TI_VERSION_CHECK(7,3,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__))
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_MALLOC __attribute__((__malloc__))
|
|
|
|
#elif NLOHMANN_JSON_HEDLEY_MSVC_VERSION_CHECK(14, 0, 0)
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_MALLOC __declspec(restrict)
|
2019-06-30 20:14:02 +00:00
|
|
|
#else
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_MALLOC
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
|
2019-07-01 20:24:39 +00:00
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_PURE)
|
|
|
|
#undef NLOHMANN_JSON_HEDLEY_PURE
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
#if \
|
2019-07-01 20:24:39 +00:00
|
|
|
NLOHMANN_JSON_HEDLEY_HAS_ATTRIBUTE(pure) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_GCC_VERSION_CHECK(2,96,0) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,11,0) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_TI_VERSION_CHECK(8,0,0) || \
|
|
|
|
(NLOHMANN_JSON_HEDLEY_TI_VERSION_CHECK(7,3,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_PGI_VERSION_CHECK(17,10,0)
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_PURE __attribute__((__pure__))
|
|
|
|
#elif NLOHMANN_JSON_HEDLEY_TI_VERSION_CHECK(6,0,0) && defined(__cplusplus)
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_PURE _Pragma("FUNC_IS_PURE;")
|
2019-06-30 20:14:02 +00:00
|
|
|
#else
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_PURE
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
|
2019-07-01 20:24:39 +00:00
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_CONST)
|
|
|
|
#undef NLOHMANN_JSON_HEDLEY_CONST
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
#if \
|
2019-07-01 20:24:39 +00:00
|
|
|
NLOHMANN_JSON_HEDLEY_HAS_ATTRIBUTE(const) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_GCC_VERSION_CHECK(2,5,0) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,11,0) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_TI_VERSION_CHECK(8,0,0) || \
|
|
|
|
(NLOHMANN_JSON_HEDLEY_TI_VERSION_CHECK(7,3,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_PGI_VERSION_CHECK(17,10,0)
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_CONST __attribute__((__const__))
|
2019-06-30 20:14:02 +00:00
|
|
|
#else
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_CONST NLOHMANN_JSON_HEDLEY_PURE
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
|
2019-07-01 20:24:39 +00:00
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_RESTRICT)
|
|
|
|
#undef NLOHMANN_JSON_HEDLEY_RESTRICT
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) && !defined(__cplusplus)
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_RESTRICT restrict
|
2019-06-30 20:14:02 +00:00
|
|
|
#elif \
|
2019-07-01 20:24:39 +00:00
|
|
|
NLOHMANN_JSON_HEDLEY_GCC_VERSION_CHECK(3,1,0) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_MSVC_VERSION_CHECK(14,0,0) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_PGI_VERSION_CHECK(17,10,0) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_TI_VERSION_CHECK(8,0,0) || \
|
|
|
|
(NLOHMANN_JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,14,0) && defined(__cplusplus)) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0) || \
|
2019-06-30 20:14:02 +00:00
|
|
|
defined(__clang__)
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_RESTRICT __restrict
|
|
|
|
#elif NLOHMANN_JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,3,0) && !defined(__cplusplus)
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_RESTRICT _Restrict
|
2019-06-30 20:14:02 +00:00
|
|
|
#else
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_RESTRICT
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
|
2019-07-01 20:24:39 +00:00
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_INLINE)
|
|
|
|
#undef NLOHMANN_JSON_HEDLEY_INLINE
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
#if \
|
|
|
|
(defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)) || \
|
|
|
|
(defined(__cplusplus) && (__cplusplus >= 199711L))
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_INLINE inline
|
2019-06-30 20:14:02 +00:00
|
|
|
#elif \
|
2019-07-01 20:24:39 +00:00
|
|
|
defined(NLOHMANN_JSON_HEDLEY_GCC_VERSION) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_ARM_VERSION_CHECK(6,2,0)
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_INLINE __inline__
|
2019-06-30 20:14:02 +00:00
|
|
|
#elif \
|
2019-07-01 20:24:39 +00:00
|
|
|
NLOHMANN_JSON_HEDLEY_MSVC_VERSION_CHECK(12,0,0) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_TI_VERSION_CHECK(8,0,0)
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_INLINE __inline
|
2019-06-30 20:14:02 +00:00
|
|
|
#else
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_INLINE
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
|
2019-07-01 20:24:39 +00:00
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_ALWAYS_INLINE)
|
|
|
|
#undef NLOHMANN_JSON_HEDLEY_ALWAYS_INLINE
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
#if \
|
2019-07-01 20:24:39 +00:00
|
|
|
NLOHMANN_JSON_HEDLEY_HAS_ATTRIBUTE(always_inline) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_GCC_VERSION_CHECK(4,0,0) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,11,0) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_TI_VERSION_CHECK(8,0,0) || \
|
|
|
|
(NLOHMANN_JSON_HEDLEY_TI_VERSION_CHECK(7,3,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__))
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_ALWAYS_INLINE __attribute__((__always_inline__)) NLOHMANN_JSON_HEDLEY_INLINE
|
|
|
|
#elif NLOHMANN_JSON_HEDLEY_MSVC_VERSION_CHECK(12,0,0)
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_ALWAYS_INLINE __forceinline
|
|
|
|
#elif NLOHMANN_JSON_HEDLEY_TI_VERSION_CHECK(7,0,0) && defined(__cplusplus)
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_ALWAYS_INLINE _Pragma("FUNC_ALWAYS_INLINE;")
|
|
|
|
#elif NLOHMANN_JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0)
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_ALWAYS_INLINE _Pragma("inline=forced")
|
|
|
|
#else
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_ALWAYS_INLINE NLOHMANN_JSON_HEDLEY_INLINE
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_NEVER_INLINE)
|
|
|
|
#undef NLOHMANN_JSON_HEDLEY_NEVER_INLINE
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
#if \
|
2019-07-01 20:24:39 +00:00
|
|
|
NLOHMANN_JSON_HEDLEY_HAS_ATTRIBUTE(noinline) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_GCC_VERSION_CHECK(4,0,0) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,11,0) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_TI_VERSION_CHECK(8,0,0) || \
|
|
|
|
(NLOHMANN_JSON_HEDLEY_TI_VERSION_CHECK(7,3,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__))
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_NEVER_INLINE __attribute__((__noinline__))
|
|
|
|
#elif NLOHMANN_JSON_HEDLEY_MSVC_VERSION_CHECK(13,10,0)
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_NEVER_INLINE __declspec(noinline)
|
|
|
|
#elif NLOHMANN_JSON_HEDLEY_PGI_VERSION_CHECK(10,2,0)
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_NEVER_INLINE _Pragma("noinline")
|
|
|
|
#elif NLOHMANN_JSON_HEDLEY_TI_VERSION_CHECK(6,0,0) && defined(__cplusplus)
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_NEVER_INLINE _Pragma("FUNC_CANNOT_INLINE;")
|
|
|
|
#elif NLOHMANN_JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0)
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_NEVER_INLINE _Pragma("inline=never")
|
|
|
|
#elif NLOHMANN_JSON_HEDLEY_COMPCERT_VERSION_CHECK(3,2,0)
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_NEVER_INLINE __attribute((noinline))
|
|
|
|
#elif NLOHMANN_JSON_HEDLEY_PELLES_VERSION_CHECK(9,0,0)
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_NEVER_INLINE __declspec(noinline)
|
|
|
|
#else
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_NEVER_INLINE
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_PRIVATE)
|
|
|
|
#undef NLOHMANN_JSON_HEDLEY_PRIVATE
|
|
|
|
#endif
|
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_PUBLIC)
|
|
|
|
#undef NLOHMANN_JSON_HEDLEY_PUBLIC
|
|
|
|
#endif
|
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_IMPORT)
|
|
|
|
#undef NLOHMANN_JSON_HEDLEY_IMPORT
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
#if defined(_WIN32) || defined(__CYGWIN__)
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_PRIVATE
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_PUBLIC __declspec(dllexport)
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_IMPORT __declspec(dllimport)
|
2019-06-30 20:14:02 +00:00
|
|
|
#else
|
|
|
|
#if \
|
2019-07-01 20:24:39 +00:00
|
|
|
NLOHMANN_JSON_HEDLEY_HAS_ATTRIBUTE(visibility) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_GCC_VERSION_CHECK(3,3,0) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,11,0) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_IBM_VERSION_CHECK(13,1,0) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_TI_VERSION_CHECK(8,0,0) || \
|
|
|
|
(NLOHMANN_JSON_HEDLEY_TI_VERSION_CHECK(7,3,0) && defined(__TI_EABI__) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__))
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_PRIVATE __attribute__((__visibility__("hidden")))
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_PUBLIC __attribute__((__visibility__("default")))
|
2019-06-30 20:14:02 +00:00
|
|
|
#else
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_PRIVATE
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_PUBLIC
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_IMPORT extern
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
|
2019-07-01 20:24:39 +00:00
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_NO_THROW)
|
|
|
|
#undef NLOHMANN_JSON_HEDLEY_NO_THROW
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
#if \
|
2019-07-01 20:24:39 +00:00
|
|
|
NLOHMANN_JSON_HEDLEY_HAS_ATTRIBUTE(nothrow) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_GCC_VERSION_CHECK(3,3,0) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0)
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_NO_THROW __attribute__((__nothrow__))
|
2019-06-30 20:14:02 +00:00
|
|
|
#elif \
|
2019-07-01 20:24:39 +00:00
|
|
|
NLOHMANN_JSON_HEDLEY_MSVC_VERSION_CHECK(13,1,0) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0)
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_NO_THROW __declspec(nothrow)
|
2019-06-30 20:14:02 +00:00
|
|
|
#else
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_NO_THROW
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
|
2019-07-01 20:24:39 +00:00
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_FALL_THROUGH)
|
|
|
|
#undef NLOHMANN_JSON_HEDLEY_FALL_THROUGH
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
#if \
|
|
|
|
defined(__cplusplus) && \
|
2019-07-01 20:24:39 +00:00
|
|
|
(!defined(NLOHMANN_JSON_HEDLEY_SUNPRO_VERSION) || NLOHMANN_JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,15,0)) && \
|
|
|
|
!defined(NLOHMANN_JSON_HEDLEY_PGI_VERSION)
|
2019-06-30 20:14:02 +00:00
|
|
|
#if \
|
|
|
|
(__cplusplus >= 201703L) || \
|
2019-07-01 20:24:39 +00:00
|
|
|
((__cplusplus >= 201103L) && NLOHMANN_JSON_HEDLEY_HAS_CPP_ATTRIBUTE(fallthrough))
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_FALL_THROUGH [[fallthrough]]
|
|
|
|
#elif (__cplusplus >= 201103L) && NLOHMANN_JSON_HEDLEY_HAS_CPP_ATTRIBUTE(clang::fallthrough)
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_FALL_THROUGH [[clang::fallthrough]]
|
|
|
|
#elif (__cplusplus >= 201103L) && NLOHMANN_JSON_HEDLEY_GCC_VERSION_CHECK(7,0,0)
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_FALL_THROUGH [[gnu::fallthrough]]
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
#endif
|
2019-07-01 20:24:39 +00:00
|
|
|
#if !defined(NLOHMANN_JSON_HEDLEY_FALL_THROUGH)
|
|
|
|
#if NLOHMANN_JSON_HEDLEY_GNUC_HAS_ATTRIBUTE(fallthrough,7,0,0) && !defined(NLOHMANN_JSON_HEDLEY_PGI_VERSION)
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_FALL_THROUGH __attribute__((__fallthrough__))
|
2019-06-30 20:14:02 +00:00
|
|
|
#elif defined(__fallthrough) /* SAL */
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_FALL_THROUGH __fallthrough
|
2019-06-30 20:14:02 +00:00
|
|
|
#else
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_FALL_THROUGH
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
2019-07-01 20:24:39 +00:00
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_RETURNS_NON_NULL)
|
|
|
|
#undef NLOHMANN_JSON_HEDLEY_RETURNS_NON_NULL
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
#if \
|
2019-07-01 20:24:39 +00:00
|
|
|
NLOHMANN_JSON_HEDLEY_HAS_ATTRIBUTE(returns_nonnull) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_GCC_VERSION_CHECK(4,9,0)
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_RETURNS_NON_NULL __attribute__((__returns_nonnull__))
|
2019-06-30 20:14:02 +00:00
|
|
|
#elif defined(_Ret_notnull_) /* SAL */
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_RETURNS_NON_NULL _Ret_notnull_
|
2019-06-30 20:14:02 +00:00
|
|
|
#else
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_RETURNS_NON_NULL
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
|
2019-07-01 20:24:39 +00:00
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_ARRAY_PARAM)
|
|
|
|
#undef NLOHMANN_JSON_HEDLEY_ARRAY_PARAM
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
#if \
|
|
|
|
defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) && \
|
|
|
|
!defined(__STDC_NO_VLA__) && \
|
|
|
|
!defined(__cplusplus) && \
|
2019-07-01 20:24:39 +00:00
|
|
|
!defined(NLOHMANN_JSON_HEDLEY_PGI_VERSION) && \
|
|
|
|
!defined(NLOHMANN_JSON_HEDLEY_TINYC_VERSION)
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_ARRAY_PARAM(name) (name)
|
2019-06-30 20:14:02 +00:00
|
|
|
#else
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_ARRAY_PARAM(name)
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
|
2019-07-01 20:24:39 +00:00
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_IS_CONSTANT)
|
|
|
|
#undef NLOHMANN_JSON_HEDLEY_IS_CONSTANT
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
2019-07-01 20:24:39 +00:00
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_REQUIRE_CONSTEXPR)
|
|
|
|
#undef NLOHMANN_JSON_HEDLEY_REQUIRE_CONSTEXPR
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
/* Note the double-underscore. For internal use only; no API
|
|
|
|
* guarantees! */
|
2019-07-01 20:24:39 +00:00
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY__IS_CONSTEXPR)
|
|
|
|
#undef NLOHMANN_JSON_HEDLEY__IS_CONSTEXPR
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#if \
|
2019-07-01 20:24:39 +00:00
|
|
|
NLOHMANN_JSON_HEDLEY_HAS_BUILTIN(__builtin_constant_p) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_GCC_VERSION_CHECK(3,4,0) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_TINYC_VERSION_CHECK(0,9,19) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_IBM_VERSION_CHECK(13,1,0) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_TI_VERSION_CHECK(6,1,0) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,10,0) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_CRAY_VERSION_CHECK(8,1,0)
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_IS_CONSTANT(expr) __builtin_constant_p(expr)
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
#if !defined(__cplusplus)
|
|
|
|
# if \
|
2019-07-01 20:24:39 +00:00
|
|
|
NLOHMANN_JSON_HEDLEY_HAS_BUILTIN(__builtin_types_compatible_p) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_GCC_VERSION_CHECK(3,4,0) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_IBM_VERSION_CHECK(13,1,0) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_CRAY_VERSION_CHECK(8,1,0) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_ARM_VERSION_CHECK(5,4,0) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_TINYC_VERSION_CHECK(0,9,24)
|
2019-06-30 20:14:02 +00:00
|
|
|
#if defined(__INTPTR_TYPE__)
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY__IS_CONSTEXPR(expr) __builtin_types_compatible_p(__typeof__((1 ? (void*) ((__INTPTR_TYPE__) ((expr) * 0)) : (int*) 0)), int*)
|
2019-06-30 20:14:02 +00:00
|
|
|
#else
|
|
|
|
#include <stdint.h>
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY__IS_CONSTEXPR(expr) __builtin_types_compatible_p(__typeof__((1 ? (void*) ((intptr_t) ((expr) * 0)) : (int*) 0)), int*)
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
# elif \
|
2019-07-01 20:24:39 +00:00
|
|
|
(defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L) && !defined(NLOHMANN_JSON_HEDLEY_SUNPRO_VERSION) && !defined(NLOHMANN_JSON_HEDLEY_PGI_VERSION)) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_HAS_EXTENSION(c_generic_selections) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_GCC_VERSION_CHECK(4,9,0) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_INTEL_VERSION_CHECK(17,0,0) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_IBM_VERSION_CHECK(12,1,0) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_ARM_VERSION_CHECK(5,3,0)
|
2019-06-30 20:14:02 +00:00
|
|
|
#if defined(__INTPTR_TYPE__)
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY__IS_CONSTEXPR(expr) _Generic((1 ? (void*) ((__INTPTR_TYPE__) ((expr) * 0)) : (int*) 0), int*: 1, void*: 0)
|
2019-06-30 20:14:02 +00:00
|
|
|
#else
|
|
|
|
#include <stdint.h>
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY__IS_CONSTEXPR(expr) _Generic((1 ? (void*) ((intptr_t) * 0) : (int*) 0), int*: 1, void*: 0)
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
# elif \
|
2019-07-01 20:24:39 +00:00
|
|
|
defined(NLOHMANN_JSON_HEDLEY_GCC_VERSION) || \
|
|
|
|
defined(NLOHMANN_JSON_HEDLEY_INTEL_VERSION) || \
|
|
|
|
defined(NLOHMANN_JSON_HEDLEY_TINYC_VERSION) || \
|
|
|
|
defined(NLOHMANN_JSON_HEDLEY_TI_VERSION) || \
|
2019-06-30 20:14:02 +00:00
|
|
|
defined(__clang__)
|
2019-07-01 20:24:39 +00:00
|
|
|
# define NLOHMANN_JSON_HEDLEY__IS_CONSTEXPR(expr) ( \
|
2019-06-30 20:14:02 +00:00
|
|
|
sizeof(void) != \
|
|
|
|
sizeof(*( \
|
|
|
|
1 ? \
|
|
|
|
((void*) ((expr) * 0L) ) : \
|
|
|
|
((struct { char v[sizeof(void) * 2]; } *) 1) \
|
|
|
|
) \
|
|
|
|
) \
|
2019-07-01 20:24:39 +00:00
|
|
|
)
|
2019-06-30 20:14:02 +00:00
|
|
|
# endif
|
|
|
|
#endif
|
2019-07-01 20:24:39 +00:00
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY__IS_CONSTEXPR)
|
|
|
|
#if !defined(NLOHMANN_JSON_HEDLEY_IS_CONSTANT)
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_IS_CONSTANT(expr) NLOHMANN_JSON_HEDLEY__IS_CONSTEXPR(expr)
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_REQUIRE_CONSTEXPR(expr) (NLOHMANN_JSON_HEDLEY__IS_CONSTEXPR(expr) ? (expr) : (-1))
|
2019-06-30 20:14:02 +00:00
|
|
|
#else
|
2019-07-01 20:24:39 +00:00
|
|
|
#if !defined(NLOHMANN_JSON_HEDLEY_IS_CONSTANT)
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_IS_CONSTANT(expr) (0)
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_REQUIRE_CONSTEXPR(expr) (expr)
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
|
2019-07-01 20:24:39 +00:00
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_BEGIN_C_DECLS)
|
|
|
|
#undef NLOHMANN_JSON_HEDLEY_BEGIN_C_DECLS
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
2019-07-01 20:24:39 +00:00
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_END_C_DECLS)
|
|
|
|
#undef NLOHMANN_JSON_HEDLEY_END_C_DECLS
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
2019-07-01 20:24:39 +00:00
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_C_DECL)
|
|
|
|
#undef NLOHMANN_JSON_HEDLEY_C_DECL
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
#if defined(__cplusplus)
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_BEGIN_C_DECLS extern "C" {
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_END_C_DECLS }
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_C_DECL extern "C"
|
2019-06-30 20:14:02 +00:00
|
|
|
#else
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_BEGIN_C_DECLS
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_END_C_DECLS
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_C_DECL
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
|
2019-07-01 20:24:39 +00:00
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_STATIC_ASSERT)
|
|
|
|
#undef NLOHMANN_JSON_HEDLEY_STATIC_ASSERT
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
#if \
|
|
|
|
!defined(__cplusplus) && ( \
|
|
|
|
(defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L)) || \
|
2019-07-01 20:24:39 +00:00
|
|
|
NLOHMANN_JSON_HEDLEY_HAS_FEATURE(c_static_assert) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_GCC_VERSION_CHECK(6,0,0) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \
|
2019-06-30 20:14:02 +00:00
|
|
|
defined(_Static_assert) \
|
|
|
|
)
|
2019-07-01 20:24:39 +00:00
|
|
|
# define NLOHMANN_JSON_HEDLEY_STATIC_ASSERT(expr, message) _Static_assert(expr, message)
|
2019-06-30 20:14:02 +00:00
|
|
|
#elif \
|
|
|
|
(defined(__cplusplus) && (__cplusplus >= 201703L)) || \
|
2019-07-01 20:24:39 +00:00
|
|
|
NLOHMANN_JSON_HEDLEY_MSVC_VERSION_CHECK(16,0,0) || \
|
|
|
|
(defined(__cplusplus) && NLOHMANN_JSON_HEDLEY_TI_VERSION_CHECK(8,3,0))
|
|
|
|
# define NLOHMANN_JSON_HEDLEY_STATIC_ASSERT(expr, message) static_assert(expr, message)
|
2019-06-30 20:14:02 +00:00
|
|
|
#elif defined(__cplusplus) && (__cplusplus >= 201103L)
|
2019-07-01 20:24:39 +00:00
|
|
|
# define NLOHMANN_JSON_HEDLEY_STATIC_ASSERT(expr, message) static_assert(expr)
|
2019-06-30 20:14:02 +00:00
|
|
|
#else
|
2019-07-01 20:24:39 +00:00
|
|
|
# define NLOHMANN_JSON_HEDLEY_STATIC_ASSERT(expr, message)
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
|
2019-07-01 20:24:39 +00:00
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_CONST_CAST)
|
|
|
|
#undef NLOHMANN_JSON_HEDLEY_CONST_CAST
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
#if defined(__cplusplus)
|
2019-07-01 20:24:39 +00:00
|
|
|
# define NLOHMANN_JSON_HEDLEY_CONST_CAST(T, expr) (const_cast<T>(expr))
|
2019-06-30 20:14:02 +00:00
|
|
|
#elif \
|
2019-07-01 20:24:39 +00:00
|
|
|
NLOHMANN_JSON_HEDLEY_HAS_WARNING("-Wcast-qual") || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_GCC_VERSION_CHECK(4,6,0) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0)
|
|
|
|
# define NLOHMANN_JSON_HEDLEY_CONST_CAST(T, expr) (__extension__ ({ \
|
|
|
|
NLOHMANN_JSON_HEDLEY_DIAGNOSTIC_PUSH \
|
|
|
|
NLOHMANN_JSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL \
|
2019-06-30 20:14:02 +00:00
|
|
|
((T) (expr)); \
|
2019-07-01 20:24:39 +00:00
|
|
|
NLOHMANN_JSON_HEDLEY_DIAGNOSTIC_POP \
|
2019-06-30 20:14:02 +00:00
|
|
|
}))
|
|
|
|
#else
|
2019-07-01 20:24:39 +00:00
|
|
|
# define NLOHMANN_JSON_HEDLEY_CONST_CAST(T, expr) ((T) (expr))
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
|
2019-07-01 20:24:39 +00:00
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_REINTERPRET_CAST)
|
|
|
|
#undef NLOHMANN_JSON_HEDLEY_REINTERPRET_CAST
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
#if defined(__cplusplus)
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_REINTERPRET_CAST(T, expr) (reinterpret_cast<T>(expr))
|
2019-06-30 20:14:02 +00:00
|
|
|
#else
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_REINTERPRET_CAST(T, expr) (*((T*) &(expr)))
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
|
2019-07-01 20:24:39 +00:00
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_STATIC_CAST)
|
|
|
|
#undef NLOHMANN_JSON_HEDLEY_STATIC_CAST
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
#if defined(__cplusplus)
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_STATIC_CAST(T, expr) (static_cast<T>(expr))
|
2019-06-30 20:14:02 +00:00
|
|
|
#else
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_STATIC_CAST(T, expr) ((T) (expr))
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
|
2019-07-01 20:24:39 +00:00
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_CPP_CAST)
|
|
|
|
#undef NLOHMANN_JSON_HEDLEY_CPP_CAST
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
#if defined(__cplusplus)
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_CPP_CAST(T, expr) static_cast<T>(expr)
|
2019-06-30 20:14:02 +00:00
|
|
|
#else
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_CPP_CAST(T, expr) (expr)
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
|
2019-07-01 20:24:39 +00:00
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_MESSAGE)
|
|
|
|
#undef NLOHMANN_JSON_HEDLEY_MESSAGE
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
2019-07-01 20:24:39 +00:00
|
|
|
#if NLOHMANN_JSON_HEDLEY_HAS_WARNING("-Wunknown-pragmas")
|
|
|
|
# define NLOHMANN_JSON_HEDLEY_MESSAGE(msg) \
|
|
|
|
NLOHMANN_JSON_HEDLEY_DIAGNOSTIC_PUSH \
|
|
|
|
NLOHMANN_JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS \
|
|
|
|
NLOHMANN_JSON_HEDLEY_PRAGMA(message msg) \
|
|
|
|
NLOHMANN_JSON_HEDLEY_DIAGNOSTIC_POP
|
2019-06-30 20:14:02 +00:00
|
|
|
#elif \
|
2019-07-01 20:24:39 +00:00
|
|
|
NLOHMANN_JSON_HEDLEY_GCC_VERSION_CHECK(4,4,0) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0)
|
|
|
|
# define NLOHMANN_JSON_HEDLEY_MESSAGE(msg) NLOHMANN_JSON_HEDLEY_PRAGMA(message msg)
|
|
|
|
#elif NLOHMANN_JSON_HEDLEY_CRAY_VERSION_CHECK(5,0,0)
|
|
|
|
# define NLOHMANN_JSON_HEDLEY_MESSAGE(msg) NLOHMANN_JSON_HEDLEY_PRAGMA(_CRI message msg)
|
|
|
|
#elif NLOHMANN_JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0)
|
|
|
|
# define NLOHMANN_JSON_HEDLEY_MESSAGE(msg) NLOHMANN_JSON_HEDLEY_PRAGMA(message(msg))
|
|
|
|
#elif NLOHMANN_JSON_HEDLEY_PELLES_VERSION_CHECK(2,0,0)
|
|
|
|
# define NLOHMANN_JSON_HEDLEY_MESSAGE(msg) NLOHMANN_JSON_HEDLEY_PRAGMA(message(msg))
|
|
|
|
#else
|
|
|
|
# define NLOHMANN_JSON_HEDLEY_MESSAGE(msg)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_WARNING)
|
|
|
|
#undef NLOHMANN_JSON_HEDLEY_WARNING
|
|
|
|
#endif
|
|
|
|
#if NLOHMANN_JSON_HEDLEY_HAS_WARNING("-Wunknown-pragmas")
|
|
|
|
# define NLOHMANN_JSON_HEDLEY_WARNING(msg) \
|
|
|
|
NLOHMANN_JSON_HEDLEY_DIAGNOSTIC_PUSH \
|
|
|
|
NLOHMANN_JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS \
|
|
|
|
NLOHMANN_JSON_HEDLEY_PRAGMA(clang warning msg) \
|
|
|
|
NLOHMANN_JSON_HEDLEY_DIAGNOSTIC_POP
|
2019-06-30 20:14:02 +00:00
|
|
|
#elif \
|
2019-07-01 20:24:39 +00:00
|
|
|
NLOHMANN_JSON_HEDLEY_GCC_VERSION_CHECK(4,8,0) || \
|
|
|
|
NLOHMANN_JSON_HEDLEY_PGI_VERSION_CHECK(18,4,0)
|
|
|
|
# define NLOHMANN_JSON_HEDLEY_WARNING(msg) NLOHMANN_JSON_HEDLEY_PRAGMA(GCC warning msg)
|
|
|
|
#elif NLOHMANN_JSON_HEDLEY_MSVC_VERSION_CHECK(15,0,0)
|
|
|
|
# define NLOHMANN_JSON_HEDLEY_WARNING(msg) NLOHMANN_JSON_HEDLEY_PRAGMA(message(msg))
|
2019-06-30 20:14:02 +00:00
|
|
|
#else
|
2019-07-01 20:24:39 +00:00
|
|
|
# define NLOHMANN_JSON_HEDLEY_WARNING(msg) NLOHMANN_JSON_HEDLEY_MESSAGE(msg)
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
|
2019-07-01 20:24:39 +00:00
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_REQUIRE_MSG)
|
|
|
|
#undef NLOHMANN_JSON_HEDLEY_REQUIRE_MSG
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
2019-07-01 20:24:39 +00:00
|
|
|
#if NLOHMANN_JSON_HEDLEY_HAS_ATTRIBUTE(diagnose_if)
|
|
|
|
# if NLOHMANN_JSON_HEDLEY_HAS_WARNING("-Wgcc-compat")
|
|
|
|
# define NLOHMANN_JSON_HEDLEY_REQUIRE_MSG(expr, msg) \
|
|
|
|
NLOHMANN_JSON_HEDLEY_DIAGNOSTIC_PUSH \
|
2019-06-30 20:14:02 +00:00
|
|
|
_Pragma("clang diagnostic ignored \"-Wgcc-compat\"") \
|
|
|
|
__attribute__((__diagnose_if__(!(expr), msg, "error"))) \
|
2019-07-01 20:24:39 +00:00
|
|
|
NLOHMANN_JSON_HEDLEY_DIAGNOSTIC_POP
|
2019-06-30 20:14:02 +00:00
|
|
|
# else
|
2019-07-01 20:24:39 +00:00
|
|
|
# define NLOHMANN_JSON_HEDLEY_REQUIRE_MSG(expr, msg) __attribute__((__diagnose_if__(!(expr), msg, "error")))
|
2019-06-30 20:14:02 +00:00
|
|
|
# endif
|
|
|
|
#else
|
2019-07-01 20:24:39 +00:00
|
|
|
# define NLOHMANN_JSON_HEDLEY_REQUIRE_MSG(expr, msg)
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
|
2019-07-01 20:24:39 +00:00
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_REQUIRE)
|
|
|
|
#undef NLOHMANN_JSON_HEDLEY_REQUIRE
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_REQUIRE(expr) NLOHMANN_JSON_HEDLEY_REQUIRE_MSG(expr, #expr)
|
2019-06-30 20:14:02 +00:00
|
|
|
|
2019-07-01 20:24:39 +00:00
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_FLAGS)
|
|
|
|
#undef NLOHMANN_JSON_HEDLEY_FLAGS
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
2019-07-01 20:24:39 +00:00
|
|
|
#if NLOHMANN_JSON_HEDLEY_HAS_ATTRIBUTE(flag_enum)
|
|
|
|
#define NLOHMANN_JSON_HEDLEY_FLAGS __attribute__((__flag_enum__))
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
|
2019-07-01 20:24:39 +00:00
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_FLAGS_CAST)
|
|
|
|
#undef NLOHMANN_JSON_HEDLEY_FLAGS_CAST
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
2019-07-01 20:24:39 +00:00
|
|
|
#if NLOHMANN_JSON_HEDLEY_INTEL_VERSION_CHECK(19,0,0)
|
|
|
|
# define NLOHMANN_JSON_HEDLEY_FLAGS_CAST(T, expr) (__extension__ ({ \
|
|
|
|
NLOHMANN_JSON_HEDLEY_DIAGNOSTIC_PUSH \
|
2019-06-30 20:14:02 +00:00
|
|
|
_Pragma("warning(disable:188)") \
|
|
|
|
((T) (expr)); \
|
2019-07-01 20:24:39 +00:00
|
|
|
NLOHMANN_JSON_HEDLEY_DIAGNOSTIC_POP \
|
2019-06-30 20:14:02 +00:00
|
|
|
}))
|
|
|
|
#else
|
2019-07-01 20:24:39 +00:00
|
|
|
# define NLOHMANN_JSON_HEDLEY_FLAGS_CAST(T, expr) NLOHMANN_JSON_HEDLEY_STATIC_CAST(T, expr)
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
/* Remaining macros are deprecated. */
|
|
|
|
|
2019-07-01 20:24:39 +00:00
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_GCC_NOT_CLANG_VERSION_CHECK)
|
|
|
|
#undef NLOHMANN_JSON_HEDLEY_GCC_NOT_CLANG_VERSION_CHECK
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
#if defined(__clang__)
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_GCC_NOT_CLANG_VERSION_CHECK(major,minor,patch) (0)
|
2019-06-30 20:14:02 +00:00
|
|
|
#else
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_GCC_NOT_CLANG_VERSION_CHECK(major,minor,patch) NLOHMANN_JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch)
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
|
|
|
|
2019-07-01 20:24:39 +00:00
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_CLANG_HAS_ATTRIBUTE)
|
|
|
|
#undef NLOHMANN_JSON_HEDLEY_CLANG_HAS_ATTRIBUTE
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_CLANG_HAS_ATTRIBUTE(attribute) NLOHMANN_JSON_HEDLEY_HAS_ATTRIBUTE(attribute)
|
2019-06-30 20:14:02 +00:00
|
|
|
|
2019-07-01 20:24:39 +00:00
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_CLANG_HAS_CPP_ATTRIBUTE)
|
|
|
|
#undef NLOHMANN_JSON_HEDLEY_CLANG_HAS_CPP_ATTRIBUTE
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_CLANG_HAS_CPP_ATTRIBUTE(attribute) NLOHMANN_JSON_HEDLEY_HAS_CPP_ATTRIBUTE(attribute)
|
2019-06-30 20:14:02 +00:00
|
|
|
|
2019-07-01 20:24:39 +00:00
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_CLANG_HAS_BUILTIN)
|
|
|
|
#undef NLOHMANN_JSON_HEDLEY_CLANG_HAS_BUILTIN
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_CLANG_HAS_BUILTIN(builtin) NLOHMANN_JSON_HEDLEY_HAS_BUILTIN(builtin)
|
2019-06-30 20:14:02 +00:00
|
|
|
|
2019-07-01 20:24:39 +00:00
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_CLANG_HAS_FEATURE)
|
|
|
|
#undef NLOHMANN_JSON_HEDLEY_CLANG_HAS_FEATURE
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_CLANG_HAS_FEATURE(feature) NLOHMANN_JSON_HEDLEY_HAS_FEATURE(feature)
|
2019-06-30 20:14:02 +00:00
|
|
|
|
2019-07-01 20:24:39 +00:00
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_CLANG_HAS_EXTENSION)
|
|
|
|
#undef NLOHMANN_JSON_HEDLEY_CLANG_HAS_EXTENSION
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_CLANG_HAS_EXTENSION(extension) NLOHMANN_JSON_HEDLEY_HAS_EXTENSION(extension)
|
2019-06-30 20:14:02 +00:00
|
|
|
|
2019-07-01 20:24:39 +00:00
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_CLANG_HAS_DECLSPEC_DECLSPEC_ATTRIBUTE)
|
|
|
|
#undef NLOHMANN_JSON_HEDLEY_CLANG_HAS_DECLSPEC_DECLSPEC_ATTRIBUTE
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_CLANG_HAS_DECLSPEC_ATTRIBUTE(attribute) NLOHMANN_JSON_HEDLEY_HAS_DECLSPEC_ATTRIBUTE(attribute)
|
2019-06-30 20:14:02 +00:00
|
|
|
|
2019-07-01 20:24:39 +00:00
|
|
|
#if defined(NLOHMANN_JSON_HEDLEY_CLANG_HAS_WARNING)
|
|
|
|
#undef NLOHMANN_JSON_HEDLEY_CLANG_HAS_WARNING
|
2019-06-30 20:14:02 +00:00
|
|
|
#endif
|
2019-07-01 20:24:39 +00:00
|
|
|
#define NLOHMANN_JSON_HEDLEY_CLANG_HAS_WARNING(warning) NLOHMANN_JSON_HEDLEY_HAS_WARNING(warning)
|
2019-06-30 20:14:02 +00:00
|
|
|
|
2019-07-01 20:24:39 +00:00
|
|
|
#endif /* !defined(NLOHMANN_JSON_HEDLEY_VERSION) || (NLOHMANN_JSON_HEDLEY_VERSION < X) */
|