Unverified Commit d046eea3 authored by FireWolf's avatar FireWolf Committed by GitHub
Browse files

node/convert: Enable the template specialization for `std::string_view`...

node/convert: Enable the template specialization for `std::string_view` properly when the library is compiled by MSVC on Windows. (#1227)
parent 9f31491b
......@@ -18,7 +18,7 @@
#include <valarray>
#include <vector>
#if __cplusplus >= 201703L
#if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L)
#include <string_view>
#endif
......@@ -93,7 +93,7 @@ struct convert<char[N]> {
static Node encode(const char* rhs) { return Node(rhs); }
};
#if __cplusplus >= 201703L
#if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L)
template <>
struct convert<std::string_view> {
static Node encode(std::string_view rhs) { return Node(std::string(rhs)); }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment