mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-02 04:04:19 +00:00
Only use absl headers if C++14 is available. (#7824)
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 https://github.com/MapServer/MapServer/issues/6822 for the use case that triggered this.
This commit is contained in:
@@ -233,7 +233,7 @@ namespace flatbuffers {
|
||||
}
|
||||
#define FLATBUFFERS_HAS_STRING_VIEW 1
|
||||
// Check for absl::string_view
|
||||
#elif __has_include("absl/strings/string_view.h")
|
||||
#elif __has_include("absl/strings/string_view.h") && (__cplusplus >= 201411)
|
||||
#include "absl/strings/string_view.h"
|
||||
namespace flatbuffers {
|
||||
typedef absl::string_view string_view;
|
||||
|
||||
Reference in New Issue
Block a user