microsoft / GSL

Guidelines Support Library
Other
6.11k stars 736 forks source link

Inspect only `__cpp_lib_byte`, drop `_HAS_STD_BYTE` #1145

Closed StephanTLavavej closed 6 months ago

StephanTLavavej commented 7 months ago

Long-awaited followup to #822 which addressed #821.

GSL 4.0.0, released 2 years ago, dropped support for VS 2017. Only VS 2019 and VS 2022 are supported. Therefore, GSL can now always use the Standard feature-test macro __cpp_lib_byte to sense whether MSVC's STL provides std::byte. It should no longer inspect the non-Standard macro _HAS_STD_BYTE (which is our "control macro").