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