From bf17035a2d15d552ffe4f94735775ce42ad18e76 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Thu, 1 Jun 2023 03:20:22 +0300 Subject: [PATCH] Disable bit_cast_test_cx when __builtin_bit_cast is not available --- test/bit_cast_test_cx.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/test/bit_cast_test_cx.cpp b/test/bit_cast_test_cx.cpp index 33a2b74..1f18535 100644 --- a/test/bit_cast_test_cx.cpp +++ b/test/bit_cast_test_cx.cpp @@ -4,6 +4,9 @@ // Distributed under the Boost Software License, Version 1.0. // https://www.boost.org/LICENSE_1_0.txt +#include +#include + #include #include @@ -11,10 +14,11 @@ BOOST_PRAGMA_MESSAGE( "Test skipped because BOOST_NO_CXX11_CONSTEXPR is defined" ) -#else +#elif !defined(BOOST_CORE_HAS_BUILTIN_BIT_CAST) -#include -#include +BOOST_PRAGMA_MESSAGE( "Test skipped because BOOST_CORE_HAS_BUILTIN_BIT_CAST is not defined" ) + +#else #define STATIC_ASSERT(...) static_assert(__VA_ARGS__, #__VA_ARGS__)