Commit 55289c55 authored by iceboy's avatar iceboy Committed by Wouter van Oortmerssen

Use string_view if _HAS_CXX17 is true (#4876)

Current version of VC2017 is not setting __cplusplus to correct value, instead they use _MSC_VER, _MSVC_LANG and _HAS_CXX17 macros.
parent ed2415eb
...@@ -158,7 +158,7 @@ ...@@ -158,7 +158,7 @@
// to detect a header that provides an implementation // to detect a header that provides an implementation
#if defined(__has_include) #if defined(__has_include)
// Check for std::string_view (in c++17) // Check for std::string_view (in c++17)
#if __has_include(<string_view>) && (__cplusplus >= 201606) #if __has_include(<string_view>) && (__cplusplus >= 201606 || _HAS_CXX17)
#include <string_view> #include <string_view>
namespace flatbuffers { namespace flatbuffers {
typedef std::string_view string_view; typedef std::string_view string_view;
......
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