diff --git a/include/nlohmann/json.hpp b/include/nlohmann/json.hpp index d7280752..85868f63 100644 --- a/include/nlohmann/json.hpp +++ b/include/nlohmann/json.hpp @@ -2829,7 +2829,7 @@ class basic_json not detail::is_basic_json::value #ifndef _MSC_VER // fix for issue #167 operator<< ambiguity under VS2015 and not std::is_same>::value -#if defined(JSON_HAS_CPP_17) && _MSC_VER <= 1914 +#if defined(JSON_HAS_CPP_17) && defined(_MSC_VER) and _MSC_VER <= 1914 and not std::is_same::value #endif #endif diff --git a/single_include/nlohmann/json.hpp b/single_include/nlohmann/json.hpp index d640e891..d0c1f02f 100644 --- a/single_include/nlohmann/json.hpp +++ b/single_include/nlohmann/json.hpp @@ -13681,7 +13681,7 @@ class basic_json not detail::is_basic_json::value #ifndef _MSC_VER // fix for issue #167 operator<< ambiguity under VS2015 and not std::is_same>::value -#if defined(JSON_HAS_CPP_17) && _MSC_VER <= 1914 +#if defined(JSON_HAS_CPP_17) && defined(_MSC_VER) and _MSC_VER <= 1914 and not std::is_same::value #endif #endif