mirror of
https://github.com/nlohmann/json
synced 2024-11-22 12:00:05 +00:00
Report the right __cplusplus value for MSVC in basic_json meta() (#3417)
* Report the right __cplusplus value for MSVC in basic_json meta() * Run amalgamate
This commit is contained in:
parent
33b75e513a
commit
ab5cecb34f
@ -310,7 +310,10 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec
|
||||
result["compiler"] = {{"family", "unknown"}, {"version", "unknown"}};
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
#if defined(_MSVC_LANG)
|
||||
result["compiler"]["c++"] = std::to_string(_MSVC_LANG);
|
||||
#elif defined(__cplusplus)
|
||||
result["compiler"]["c++"] = std::to_string(__cplusplus);
|
||||
#else
|
||||
result["compiler"]["c++"] = "unknown";
|
||||
|
@ -17505,7 +17505,10 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec
|
||||
result["compiler"] = {{"family", "unknown"}, {"version", "unknown"}};
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
#if defined(_MSVC_LANG)
|
||||
result["compiler"]["c++"] = std::to_string(_MSVC_LANG);
|
||||
#elif defined(__cplusplus)
|
||||
result["compiler"]["c++"] = std::to_string(__cplusplus);
|
||||
#else
|
||||
result["compiler"]["c++"] = "unknown";
|
||||
|
Loading…
Reference in New Issue
Block a user