File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 3333
3434#include <type_traits>
3535
36+ // VS2017 15.8 added support for the __cpp_lib_byte definition
37+ // To do: drop _HAS_STD_BYTE when support for pre 15.8 expires
3638#ifdef _MSC_VER
3739
3840#pragma warning(push)
4244
4345#ifndef GSL_USE_STD_BYTE
4446// this tests if we are under MSVC and the standard lib has std::byte and it is enabled
45- #if defined(_HAS_STD_BYTE) && _HAS_STD_BYTE
47+ #if ( defined(_HAS_STD_BYTE) && _HAS_STD_BYTE) || (defined(__cpp_lib_byte) && __cpp_lib_byte >= 201603)
4648
4749#define GSL_USE_STD_BYTE 1
4850
49- #else // defined(_HAS_STD_BYTE) && _HAS_STD_BYTE
51+ #else // ( defined(_HAS_STD_BYTE) && _HAS_STD_BYTE) || (defined(__cpp_lib_byte) && __cpp_lib_byte >= 201603)
5052
5153#define GSL_USE_STD_BYTE 0
5254
53- #endif // defined(_HAS_STD_BYTE) && _HAS_STD_BYTE
55+ #endif // ( defined(_HAS_STD_BYTE) && _HAS_STD_BYTE) || (defined(__cpp_lib_byte) && __cpp_lib_byte >= 201603)
5456#endif // GSL_USE_STD_BYTE
5557
5658#else // _MSC_VER
You can’t perform that action at this time.
0 commit comments