From 118093b6139cb49993f72757b32afe0067051284 Mon Sep 17 00:00:00 2001 From: Paul Reimer Date: Thu, 26 Jul 2018 15:40:41 -0700 Subject: [PATCH] Update FLATBUFFERS_HAS_STRING_VIEW __cplusplus checks to the versions provided by the standard feature test macros. (#4841) --- include/flatbuffers/base.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/flatbuffers/base.h b/include/flatbuffers/base.h index 5fe5017..e09e828 100644 --- a/include/flatbuffers/base.h +++ b/include/flatbuffers/base.h @@ -158,14 +158,14 @@ // to detect a header that provides an implementation #if defined(__has_include) // Check for std::string_view (in c++17) - #if __has_include() && (__cplusplus > 201402) + #if __has_include() && (__cplusplus >= 201606) #include namespace flatbuffers { typedef std::string_view string_view; } #define FLATBUFFERS_HAS_STRING_VIEW 1 // Check for std::experimental::string_view (in c++14, compiler-dependent) - #elif __has_include() && (__cplusplus > 201103) + #elif __has_include() && (__cplusplus >= 201411) #include namespace flatbuffers { typedef std::experimental::string_view string_view; -- 2.7.4