MCPcopy Create free account
hub / github.com/Open-GD/OpenGD / basic_json meta

Function basic_json meta

Source/external/json.hpp:19423–19485  ·  view source on GitHub ↗

@brief returns version information on the library @sa https://json.nlohmann.me/api/basic_json/meta/

Source from the content-addressed store, hash-verified

19421 /// @brief returns version information on the library
19422 /// @sa https://json.nlohmann.me/api/basic_json/meta/
19423 JSON_HEDLEY_WARN_UNUSED_RESULT
19424 static basic_json meta()
19425 {
19426 basic_json result;
19427
19428 result["copyright"] = "(C) 2013-2022 Niels Lohmann";
19429 result["name"] = "JSON for Modern C++";
19430 result["url"] = "https://github.com/nlohmann/json";
19431 result["version"]["string"] =
19432 detail::concat(std::to_string(NLOHMANN_JSON_VERSION_MAJOR), '.',
19433 std::to_string(NLOHMANN_JSON_VERSION_MINOR), '.',
19434 std::to_string(NLOHMANN_JSON_VERSION_PATCH));
19435 result["version"]["major"] = NLOHMANN_JSON_VERSION_MAJOR;
19436 result["version"]["minor"] = NLOHMANN_JSON_VERSION_MINOR;
19437 result["version"]["patch"] = NLOHMANN_JSON_VERSION_PATCH;
19438
19439#ifdef _WIN32
19440 result["platform"] = "win32";
19441#elif defined __linux__
19442 result["platform"] = "linux";
19443#elif defined __APPLE__
19444 result["platform"] = "apple";
19445#elif defined __unix__
19446 result["platform"] = "unix";
19447#else
19448 result["platform"] = "unknown";
19449#endif
19450
19451#if defined(__ICC) || defined(__INTEL_COMPILER)
19452 result["compiler"] = {{"family", "icc"}, {"version", __INTEL_COMPILER}};
19453#elif defined(__clang__)
19454 result["compiler"] = {{"family", "clang"}, {"version", __clang_version__}};
19455#elif defined(__GNUC__) || defined(__GNUG__)
19456 result["compiler"] = {{"family", "gcc"}, {"version", detail::concat(
19457 std::to_string(__GNUC__), '.',
19458 std::to_string(__GNUC_MINOR__), '.',
19459 std::to_string(__GNUC_PATCHLEVEL__))
19460 }
19461 };
19462#elif defined(__HP_cc) || defined(__HP_aCC)
19463 result["compiler"] = "hp"
19464#elif defined(__IBMCPP__)
19465 result["compiler"] = {{"family", "ilecpp"}, {"version", __IBMCPP__}};
19466#elif defined(_MSC_VER)
19467 result["compiler"] = {{"family", "msvc"}, {"version", _MSC_VER}};
19468#elif defined(__PGI)
19469 result["compiler"] = {{"family", "pgcpp"}, {"version", __PGI}};
19470#elif defined(__SUNPRO_CC)
19471 result["compiler"] = {{"family", "sunpro"}, {"version", __SUNPRO_CC}};
19472#else
19473 result["compiler"] = {{"family", "unknown"}, {"version", "unknown"}};
19474#endif
19475
19476
19477#if defined(_MSVC_LANG)
19478 result["compiler"]["c++"] = std::to_string(_MSVC_LANG);
19479#elif defined(__cplusplus)
19480 result["compiler"]["c++"] = std::to_string(__cplusplus);

Callers

nothing calls this directly

Calls 2

concatFunction · 0.85
to_stringFunction · 0.70

Tested by

no test coverage detected