From 55289c55bf1b1a37d4598fdeb658d04c0c07af55 Mon Sep 17 00:00:00 2001 From: iceboy Date: Mon, 13 Aug 2018 16:19:51 -0700 Subject: [PATCH] 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. --- include/flatbuffers/base.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/flatbuffers/base.h b/include/flatbuffers/base.h index e09e828..61ca651 100644 --- a/include/flatbuffers/base.h +++ b/include/flatbuffers/base.h @@ -158,7 +158,7 @@ // to detect a header that provides an implementation #if defined(__has_include) // Check for std::string_view (in c++17) - #if __has_include() && (__cplusplus >= 201606) + #if __has_include() && (__cplusplus >= 201606 || _HAS_CXX17) #include namespace flatbuffers { typedef std::string_view string_view; -- 2.7.4