From 7f1af7cb02aad67c8a02ea541c78dee5df4a70e5 Mon Sep 17 00:00:00 2001 From: Brian Harris Date: Tue, 15 Oct 2019 12:56:58 -0500 Subject: [PATCH] Fix build with gcc version 7.4.0 (#5570) --- 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 6e76a3f8e..a8b14073d 100644 --- a/include/flatbuffers/base.h +++ b/include/flatbuffers/base.h @@ -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() && (__cplusplus >= 201606 || _HAS_CXX17) + #if __has_include() && (__cplusplus >= 201606 || (defined(_HAS_CXX17) && _HAS_CXX17)) #include namespace flatbuffers { typedef std::string_view string_view;