diff --git a/include/nlohmann/json.hpp b/include/nlohmann/json.hpp index d72807523..85868f639 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 d640e8918..d0c1f02ff 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