-
Notifications
You must be signed in to change notification settings - Fork 758
Closed
Description
Lines 43 to 54 in 3d56ba9
| #ifndef GSL_USE_STD_BYTE | |
| // this tests if we are under MSVC and the standard lib has std::byte and it is enabled | |
| #if defined(_HAS_STD_BYTE) && _HAS_STD_BYTE | |
| #define GSL_USE_STD_BYTE 1 | |
| #else // defined(_HAS_STD_BYTE) && _HAS_STD_BYTE | |
| #define GSL_USE_STD_BYTE 0 | |
| #endif // defined(_HAS_STD_BYTE) && _HAS_STD_BYTE | |
| #endif // GSL_USE_STD_BYTE |
inspects an implementation-specific macro _HAS_STD_BYTE defined by MSVC's STL:
instead of the Standard feature-test macro __cpp_lib_byte:
GSL could inspect both, which would make it compatible with:
- VS 2017 15.3 (which added
std::byteand_HAS_STD_BYTE) through 15.7 - VS 2017 15.8 (which added
__cpp_lib_byte) through VS 2019 today - Future versions of VS (when GSL stops inspecting
_HAS_STD_BYTEalone, VS can stop defining it).
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels