diff options
author | beinhaerter <34543625+beinhaerter@users.noreply.github.com> | 2019-08-14 21:40:35 +0200 |
---|---|---|
committer | Anna Gringauze <anna_gringauze@hotmail.com> | 2019-08-14 12:40:35 -0700 |
commit | 1d48188de9e979a27f29286d76bb0622323a8952 (patch) | |
tree | 3b6552a0def5af3f702b2e020b10121b1ce49cd6 /include | |
parent | 1212beae777dba02c230ece8c0c0ec12790047ea (diff) | |
download | platform_external_Microsoft-GSL-1d48188de9e979a27f29286d76bb0622323a8952.tar.gz platform_external_Microsoft-GSL-1d48188de9e979a27f29286d76bb0622323a8952.tar.bz2 platform_external_Microsoft-GSL-1d48188de9e979a27f29286d76bb0622323a8952.zip |
Fixed check if std::byte is available (#764)
The check for std::byte existance fails on gcc 8.2. According to https://en.cppreference.com/w/cpp/utility/feature_test it is necessary to `#include <cstddef>` before checking `__cpp_lib_byte`.
Diffstat (limited to 'include')
-rw-r--r-- | include/gsl/gsl_byte | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/gsl/gsl_byte b/include/gsl/gsl_byte index 861446d..1670646 100644 --- a/include/gsl/gsl_byte +++ b/include/gsl/gsl_byte @@ -56,6 +56,7 @@ #else // _MSC_VER #ifndef GSL_USE_STD_BYTE +#include <cstddef> /* __cpp_lib_byte */ // this tests if we are under GCC or Clang with enough -std:c++1z power to get us std::byte // also check if libc++ version is sufficient (> 5.0) or libstc++ actually contains std::byte #if defined(__cplusplus) && (__cplusplus >= 201703L) && \ @@ -63,7 +64,6 @@ defined(_LIBCPP_VERSION) && (_LIBCPP_VERSION >= 5000)) #define GSL_USE_STD_BYTE 1 -#include <cstddef> #else // defined(__cplusplus) && (__cplusplus >= 201703L) && // (defined(__cpp_lib_byte) && (__cpp_lib_byte >= 201603) || |