Update FLATBUFFERS_HAS_STRING_VIEW __cplusplus checks to the versions provided by...
authorPaul Reimer <paulreimer@users.noreply.github.com>
Thu, 26 Jul 2018 22:40:41 +0000 (15:40 -0700)
committerWouter van Oortmerssen <aardappel@gmail.com>
Thu, 26 Jul 2018 22:40:41 +0000 (15:40 -0700)
include/flatbuffers/base.h

index 5fe5017..e09e828 100644 (file)
   // to detect a header that provides an implementation
   #if defined(__has_include)
     // Check for std::string_view (in c++17)
-    #if __has_include(<string_view>) && (__cplusplus > 201402)
+    #if __has_include(<string_view>) && (__cplusplus >= 201606)
       #include <string_view>
       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(<experimental/string_view>) && (__cplusplus > 201103)
+    #elif __has_include(<experimental/string_view>) && (__cplusplus >= 201411)
       #include <experimental/string_view>
       namespace flatbuffers {
         typedef std::experimental::string_view string_view;