mirror of
https://github.com/catchorg/Catch2.git
synced 2025-08-03 22:05:39 +02:00
Fix compiling with C++17 + Clang 5 + libstdc++ v5
This basically tests the combination where the compiler supports most of C++17 but the library does not.
This commit is contained in:

committed by
Martin Hořeňovský

parent
023b5306b4
commit
86f86c4c23
@@ -222,7 +222,7 @@
|
||||
// Check if byte is available and usable
|
||||
# if __has_include(<cstddef>) && defined(CATCH_CPP17_OR_GREATER)
|
||||
# include <cstddef>
|
||||
# if __cpp_lib_byte > 0
|
||||
# if defined(__cpp_lib_byte) && (__cpp_lib_byte > 0)
|
||||
# define CATCH_INTERNAL_CONFIG_CPP17_BYTE
|
||||
# endif
|
||||
# endif // __has_include(<cstddef>) && defined(CATCH_CPP17_OR_GREATER)
|
||||
|
@@ -55,11 +55,11 @@ namespace Matchers {
|
||||
return arr;
|
||||
}
|
||||
|
||||
#ifdef CATCH_CPP17_OR_GREATER
|
||||
#if defined( __cpp_lib_logical_traits ) && __cpp_lib_logical_traits >= 201510
|
||||
|
||||
using std::conjunction;
|
||||
|
||||
#else // CATCH_CPP17_OR_GREATER
|
||||
#else // __cpp_lib_logical_traits
|
||||
|
||||
template<typename... Cond>
|
||||
struct conjunction : std::true_type {};
|
||||
@@ -67,7 +67,7 @@ namespace Matchers {
|
||||
template<typename Cond, typename... Rest>
|
||||
struct conjunction<Cond, Rest...> : std::integral_constant<bool, Cond::value && conjunction<Rest...>::value> {};
|
||||
|
||||
#endif // CATCH_CPP17_OR_GREATER
|
||||
#endif // __cpp_lib_logical_traits
|
||||
|
||||
template<typename T>
|
||||
using is_generic_matcher = std::is_base_of<
|
||||
|
Reference in New Issue
Block a user