Update std::byte detection in gsl_byte for MSVC (#561)

* Only check that `_HAS_STD_BYTE` is defined to a non-zero value
This commit is contained in:
Casey Carter 2017-10-18 16:35:11 -07:00 committed by Neil MacIntosh
parent 4c5fdb541f
commit 166ea80f66
2 changed files with 4 additions and 3 deletions

View File

@ -30,15 +30,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 _MSC_VER >= 1911 && (!defined(_HAS_STD_BYTE) || _HAS_STD_BYTE)
#if defined(_HAS_STD_BYTE) && _HAS_STD_BYTE
#define GSL_USE_STD_BYTE 1
#else // _MSC_VER >= 1911 && (!defined(_HAS_STD_BYTE) || _HAS_STD_BYTE)
#else // defined(_HAS_STD_BYTE) && _HAS_STD_BYTE
#define GSL_USE_STD_BYTE 0
#endif // _MSC_VER >= 1911 && (!defined(_HAS_STD_BYTE) || _HAS_STD_BYTE)
#endif // defined(_HAS_STD_BYTE) && _HAS_STD_BYTE
#endif // GSL_USE_STD_BYTE
#else // _MSC_VER

1
tests/unittest-cpp Submodule

@ -0,0 +1 @@
Subproject commit dc6b90838014ab985bf3cd74ac17ad9d00e1fbcb