mirror of
https://github.com/vee1e/flatbuffers.git
synced 2026-09-01 17:57:25 +00:00
Fix: detect c++ standard on MSVC for span (#8155)
This commit is contained in:
parent
32029ac699
commit
46577d0d2f
1 changed files with 2 additions and 1 deletions
|
|
@ -45,7 +45,8 @@
|
|||
// Testing __cpp_lib_span requires including either <version> or <span>,
|
||||
// both of which were added in C++20.
|
||||
// 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)
|
||||
#define FLATBUFFERS_USE_STD_SPAN 1
|
||||
#endif
|
||||
#endif // FLATBUFFERS_USE_STD_SPAN
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue