From 2e0d1ba48c38ddc0c22f6a023cad7b2c75a43466 Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Mon, 26 Feb 2024 13:22:20 -0800 Subject: [PATCH] Test only `__cpp_lib_byte`, drop `_HAS_STD_BYTE`. (#1145) --- include/gsl/byte | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/include/gsl/byte b/include/gsl/byte index 7f30ae22..87d007ef 100644 --- a/include/gsl/byte +++ b/include/gsl/byte @@ -19,8 +19,6 @@ #include -// VS2017 15.8 added support for the __cpp_lib_byte definition -// To do: drop _HAS_STD_BYTE when support for pre 15.8 expires #ifdef _MSC_VER #pragma warning(push) @@ -31,18 +29,15 @@ #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) || \ - (defined(__cpp_lib_byte) && __cpp_lib_byte >= 201603) +#if defined(__cpp_lib_byte) && __cpp_lib_byte >= 201603 #define GSL_USE_STD_BYTE 1 -#else // (defined(_HAS_STD_BYTE) && _HAS_STD_BYTE) || (defined(__cpp_lib_byte) && __cpp_lib_byte >= - // 201603) +#else // defined(__cpp_lib_byte) && __cpp_lib_byte >= 201603 #define GSL_USE_STD_BYTE 0 -#endif // (defined(_HAS_STD_BYTE) && _HAS_STD_BYTE) || (defined(__cpp_lib_byte) && __cpp_lib_byte >= - // 201603) +#endif // defined(__cpp_lib_byte) && __cpp_lib_byte >= 201603 #endif // GSL_USE_STD_BYTE #else // _MSC_VER