forked from boostorg/array
Disable <=> tests when <compare> isn't available
This commit is contained in:
@ -8,6 +8,12 @@
|
||||
#include <boost/config/pragma_message.hpp>
|
||||
#include <cstddef>
|
||||
|
||||
#if defined(__has_include)
|
||||
# if __has_include(<compare>)
|
||||
# define HAS_COMPARE
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if !defined(__cpp_impl_three_way_comparison)
|
||||
|
||||
BOOST_PRAGMA_MESSAGE( "Test skipped because __cpp_impl_three_way_comparison is not defined" )
|
||||
@ -18,6 +24,11 @@ int main() {}
|
||||
BOOST_PRAGMA_MESSAGE( "Test skipped because __cpp_impl_three_way_comparison is defined to " BOOST_STRINGIZE(__cpp_impl_three_way_comparison) )
|
||||
int main() {}
|
||||
|
||||
#elif !defined(HAS_COMPARE)
|
||||
|
||||
BOOST_PRAGMA_MESSAGE( "Test skipped because <compare> is not available" )
|
||||
int main() {}
|
||||
|
||||
#else
|
||||
|
||||
template<class T, std::size_t N> void test()
|
||||
|
@ -8,6 +8,12 @@
|
||||
#include <boost/config/workaround.hpp>
|
||||
#include <cstddef>
|
||||
|
||||
#if defined(__has_include)
|
||||
# if __has_include(<compare>)
|
||||
# define HAS_COMPARE
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if !defined(__cpp_impl_three_way_comparison)
|
||||
|
||||
BOOST_PRAGMA_MESSAGE( "Test skipped because __cpp_impl_three_way_comparison is not defined" )
|
||||
@ -18,6 +24,11 @@ int main() {}
|
||||
BOOST_PRAGMA_MESSAGE( "Test skipped because __cpp_impl_three_way_comparison is defined to " BOOST_STRINGIZE(__cpp_impl_three_way_comparison) )
|
||||
int main() {}
|
||||
|
||||
#elif !defined(HAS_COMPARE)
|
||||
|
||||
BOOST_PRAGMA_MESSAGE( "Test skipped because <compare> is not available" )
|
||||
int main() {}
|
||||
|
||||
#else
|
||||
|
||||
#define STATIC_ASSERT(...) static_assert(__VA_ARGS__, #__VA_ARGS__)
|
||||
|
Reference in New Issue
Block a user