diff options
| author | Gregory Bond | 2020-08-03 13:03:19 +1000 |
|---|---|---|
| committer | Martin Hořeňovský | 2020-09-07 13:01:51 +0200 |
| commit | 5ad1a4fe6138272db57c4f8e98931be77e4c3c5b (patch) | |
| tree | 53380c23fffd8a1f66663ea70976b098f0d8f853 /src | |
| parent | 2c1c02f7e7521ee28d2b931a42160915b4791049 (diff) | |
| download | catch3-5ad1a4fe6138272db57c4f8e98931be77e4c3c5b.tar.gz | |
Issue 1992: Better c++17 std::byte detection
This fixed buld errors for ubuntu-16 + clang and similar situations
where C++17 is supported in the compiler but not the default
C++ standard library.
Diffstat (limited to 'src')
| -rw-r--r-- | src/catch2/internal/catch_compiler_capabilities.hpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/catch2/internal/catch_compiler_capabilities.hpp b/src/catch2/internal/catch_compiler_capabilities.hpp index 4862e57f..cb5c243b 100644 --- a/src/catch2/internal/catch_compiler_capabilities.hpp +++ b/src/catch2/internal/catch_compiler_capabilities.hpp @@ -240,7 +240,10 @@ // Check if byte is available and usable # if __has_include(<cstddef>) && defined(CATCH_CPP17_OR_GREATER) - # define CATCH_INTERNAL_CONFIG_CPP17_BYTE + # include <cstddef> + # if __cpp_lib_byte > 0 + # define CATCH_INTERNAL_CONFIG_CPP17_BYTE + # endif # endif // __has_include(<cstddef>) && defined(CATCH_CPP17_OR_GREATER) // Check if variant is available and usable |