More robust <span> check (#8631)

This commit is contained in:
Yuanyuan Chen
2025-11-27 06:33:06 +08:00
committed by GitHub
parent 20068cfa05
commit 7808ae5c88

View File

@@ -47,8 +47,10 @@
// See: https://en.cppreference.com/w/cpp/utility/feature_test // See: https://en.cppreference.com/w/cpp/utility/feature_test
#if defined(__cplusplus) && __cplusplus >= 202002L \ #if defined(__cplusplus) && __cplusplus >= 202002L \
|| (defined(_MSVC_LANG) && _MSVC_LANG >= 202002L) || (defined(_MSVC_LANG) && _MSVC_LANG >= 202002L)
#if __has_include(<span>)
#define FLATBUFFERS_USE_STD_SPAN 1 #define FLATBUFFERS_USE_STD_SPAN 1
#endif #endif
#endif
#endif // FLATBUFFERS_USE_STD_SPAN #endif // FLATBUFFERS_USE_STD_SPAN
#if defined(FLATBUFFERS_USE_STD_SPAN) #if defined(FLATBUFFERS_USE_STD_SPAN)