diff --git a/include/yaml-cpp/node/convert.h b/include/yaml-cpp/node/convert.h index d0eb450f7..d49702f82 100644 --- a/include/yaml-cpp/node/convert.h +++ b/include/yaml-cpp/node/convert.h @@ -18,7 +18,7 @@ #include #include -#if __cplusplus >= 201703L +#if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L) #include #endif @@ -93,7 +93,7 @@ struct convert { static Node encode(const char* rhs) { return Node(rhs); } }; -#if __cplusplus >= 201703L +#if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L) template <> struct convert { static Node encode(std::string_view rhs) { return Node(std::string(rhs)); }