Fix build with gcc version 7.4.0 (#5570)

This commit is contained in:
Brian Harris
2019-10-15 12:56:58 -05:00
committed by Wouter van Oortmerssen
parent 32f47ad247
commit 7f1af7cb02

View File

@@ -199,7 +199,7 @@ namespace flatbuffers {
// 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 >= 201606 || _HAS_CXX17)
#if __has_include(<string_view>) && (__cplusplus >= 201606 || (defined(_HAS_CXX17) && _HAS_CXX17))
#include <string_view>
namespace flatbuffers {
typedef std::string_view string_view;