mirror of
https://github.com/boostorg/smart_ptr.git
synced 2025-08-01 21:54:28 +02:00
atomic_sp_constexpr_test: add pragma messages when skipped
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// atomic_sp_constexpr_test.cpp
|
// atomic_sp_constexpr_test.cpp
|
||||||
//
|
//
|
||||||
// Copyright 2017 Peter Dimov
|
// Copyright 2017, 2018 Peter Dimov
|
||||||
//
|
//
|
||||||
// Distributed under the Boost Software License, Version 1.0.
|
// Distributed under the Boost Software License, Version 1.0.
|
||||||
// See accompanying file LICENSE_1_0.txt or copy at
|
// See accompanying file LICENSE_1_0.txt or copy at
|
||||||
@@ -9,32 +9,36 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
#include <boost/config.hpp>
|
#include <boost/config.hpp>
|
||||||
#include <boost/detail/workaround.hpp>
|
#include <boost/config/workaround.hpp>
|
||||||
|
#include <boost/config/pragma_message.hpp>
|
||||||
#define HAVE_CONSTEXPR_INIT
|
|
||||||
|
|
||||||
#if defined( BOOST_NO_CXX11_CONSTEXPR )
|
#if defined( BOOST_NO_CXX11_CONSTEXPR )
|
||||||
# undef HAVE_CONSTEXPR_INIT
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if BOOST_WORKAROUND( BOOST_MSVC, < 1920 )
|
BOOST_PRAGMA_MESSAGE("Skipping test due to BOOST_NO_CXX11_CONSTEXPR")
|
||||||
# undef HAVE_CONSTEXPR_INIT
|
int main() {}
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(__clang__) && defined( BOOST_NO_CXX14_CONSTEXPR )
|
#elif BOOST_WORKAROUND( BOOST_MSVC, < 1920 )
|
||||||
# undef HAVE_CONSTEXPR_INIT
|
|
||||||
#endif
|
// MSVC does not implement static initialization for constexpr
|
||||||
|
BOOST_PRAGMA_MESSAGE("Skipping test due to BOOST_MSVC < 1920")
|
||||||
|
int main() {}
|
||||||
|
|
||||||
|
#elif defined(__clang__) && defined( BOOST_NO_CXX14_CONSTEXPR )
|
||||||
|
|
||||||
|
// Clang only implements static initialization for constexpr in C++14 mode
|
||||||
|
BOOST_PRAGMA_MESSAGE("Skipping test due to __clang__ and BOOST_NO_CXX14_CONSTEXPR")
|
||||||
|
int main() {}
|
||||||
|
|
||||||
|
#elif defined( _LIBCPP_VERSION ) && ( _LIBCPP_VERSION < 5000 )
|
||||||
|
|
||||||
#if defined( _LIBCPP_VERSION ) && ( _LIBCPP_VERSION < 5000 )
|
|
||||||
// in libc++, atomic_flag has a non-constexpr constructor from bool
|
// in libc++, atomic_flag has a non-constexpr constructor from bool
|
||||||
# undef HAVE_CONSTEXPR_INIT
|
BOOST_PRAGMA_MESSAGE("Skipping test due to _LIBCPP_VERSION < 5000")
|
||||||
#endif
|
int main() {}
|
||||||
|
|
||||||
#if !defined( HAVE_CONSTEXPR_INIT ) || defined( BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX )
|
#elif defined( BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX )
|
||||||
|
|
||||||
int main()
|
BOOST_PRAGMA_MESSAGE("Skipping test due to BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX")
|
||||||
{
|
int main() {}
|
||||||
}
|
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
@@ -69,4 +73,4 @@ int main()
|
|||||||
return boost::report_errors();
|
return boost::report_errors();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // #if defined( BOOST_NO_CXX11_CONSEXPR )
|
#endif
|
||||||
|
Reference in New Issue
Block a user