cataclysm-dda's src/third-party/flatbuffers_int/base.h has this, which
looks for a string_view implementation:
215 #ifndef FLATBUFFERS_HAS_STRING_VIEW
216 // Only provide flatbuffers::string_view if __has_include can be used
217 // to detect a header that provides an implementation
218 #if defined(__has_include)
219 // Check for std::string_view (in c++17)
220 #if __has_include(<string_view>) && (__cplusplus >= 201606 || (defined(_HAS_CXX17) && _HAS_CXX17))
221 #include <string_view>
222 namespace flatbuffers {
223 typedef std::string_view string_view;
224 }
225 #define FLATBUFFERS_HAS_STRING_VIEW 1
226 // Check for std::experimental::string_view (in c++14, compiler-dependent)
227 #elif __has_include(<experimental/string_view>) && (__cplusplus >= 201411)
228 #include <experimental/string_view>
229 namespace flatbuffers {
230 typedef std::experimental::string_view string_view;
231 }
232 #define FLATBUFFERS_HAS_STRING_VIEW 1
233 // Check for absl::string_view
234 #elif __has_include("absl/strings/string_view.h")
235 #include "absl/strings/string_view.h"
236 namespace flatbuffers {
237 typedef absl::string_view string_view;
238 }
239 #define FLATBUFFERS_HAS_STRING_VIEW 1
240
No comments:
Post a Comment