Skip to content

Commit

Permalink
Only use absl headers if C++14 is available. (#7824)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
rouault authored and dbaileychess committed Mar 15, 2023
1 parent f5342ab commit a5655f4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/flatbuffers/base.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit a5655f4

Please sign in to comment.