mirror of
https://github.com/boostorg/array.git
synced 2025-07-30 20:57:19 +02:00
Disable <=> tests when <compare> isn't available
This commit is contained in:
@ -8,6 +8,12 @@
|
|||||||
#include <boost/config/pragma_message.hpp>
|
#include <boost/config/pragma_message.hpp>
|
||||||
#include <cstddef>
|
#include <cstddef>
|
||||||
|
|
||||||
|
#if defined(__has_include)
|
||||||
|
# if __has_include(<compare>)
|
||||||
|
# define HAS_COMPARE
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#if !defined(__cpp_impl_three_way_comparison)
|
#if !defined(__cpp_impl_three_way_comparison)
|
||||||
|
|
||||||
BOOST_PRAGMA_MESSAGE( "Test skipped because __cpp_impl_three_way_comparison is not defined" )
|
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) )
|
BOOST_PRAGMA_MESSAGE( "Test skipped because __cpp_impl_three_way_comparison is defined to " BOOST_STRINGIZE(__cpp_impl_three_way_comparison) )
|
||||||
int main() {}
|
int main() {}
|
||||||
|
|
||||||
|
#elif !defined(HAS_COMPARE)
|
||||||
|
|
||||||
|
BOOST_PRAGMA_MESSAGE( "Test skipped because <compare> is not available" )
|
||||||
|
int main() {}
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
template<class T, std::size_t N> void test()
|
template<class T, std::size_t N> void test()
|
||||||
|
@ -8,6 +8,12 @@
|
|||||||
#include <boost/config/workaround.hpp>
|
#include <boost/config/workaround.hpp>
|
||||||
#include <cstddef>
|
#include <cstddef>
|
||||||
|
|
||||||
|
#if defined(__has_include)
|
||||||
|
# if __has_include(<compare>)
|
||||||
|
# define HAS_COMPARE
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#if !defined(__cpp_impl_three_way_comparison)
|
#if !defined(__cpp_impl_three_way_comparison)
|
||||||
|
|
||||||
BOOST_PRAGMA_MESSAGE( "Test skipped because __cpp_impl_three_way_comparison is not defined" )
|
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) )
|
BOOST_PRAGMA_MESSAGE( "Test skipped because __cpp_impl_three_way_comparison is defined to " BOOST_STRINGIZE(__cpp_impl_three_way_comparison) )
|
||||||
int main() {}
|
int main() {}
|
||||||
|
|
||||||
|
#elif !defined(HAS_COMPARE)
|
||||||
|
|
||||||
|
BOOST_PRAGMA_MESSAGE( "Test skipped because <compare> is not available" )
|
||||||
|
int main() {}
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
#define STATIC_ASSERT(...) static_assert(__VA_ARGS__, #__VA_ARGS__)
|
#define STATIC_ASSERT(...) static_assert(__VA_ARGS__, #__VA_ARGS__)
|
||||||
|
Reference in New Issue
Block a user