diff --git a/include/yaml-cpp/node/convert.h b/include/yaml-cpp/node/convert.h index 9dea370..d0eb450 100644 --- a/include/yaml-cpp/node/convert.h +++ b/include/yaml-cpp/node/convert.h @@ -17,9 +17,8 @@ #include #include #include -#include -#ifdef __cpp_lib_string_view +#if __cplusplus >= 201703L #include #endif @@ -94,7 +93,7 @@ struct convert { static Node encode(const char* rhs) { return Node(rhs); } }; -#ifdef __cpp_lib_string_view +#if __cplusplus >= 201703L template <> struct convert { static Node encode(std::string_view rhs) { return Node(std::string(rhs)); }