Skip to content

Commit 3d88680

Browse files
committed
Only use absl headers if C++14 is available.
If flatbuffers is built in C++11 mode, but there is a recent version of absl which requires C++14, the build will fail. Cf MapServer/MapServer#6822 for the use case that triggered this.
1 parent 4c71f87 commit 3d88680

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/flatbuffers/base.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ namespace flatbuffers {
233233
}
234234
#define FLATBUFFERS_HAS_STRING_VIEW 1
235235
// Check for absl::string_view
236-
#elif __has_include("absl/strings/string_view.h")
236+
#elif __has_include("absl/strings/string_view.h") && (__cplusplus >= 201411)
237237
#include "absl/strings/string_view.h"
238238
namespace flatbuffers {
239239
typedef absl::string_view string_view;

0 commit comments

Comments
 (0)