diff options
author | robot-contrib <robot-contrib@yandex-team.com> | 2023-12-17 22:15:05 +0300 |
---|---|---|
committer | robot-contrib <robot-contrib@yandex-team.com> | 2023-12-17 22:35:14 +0300 |
commit | 0992f8e13bc8aab92fcc68904ff895fb37b4730b (patch) | |
tree | fabc9c3d32af081da61ed72dbf24c9899904cb5a /contrib/restricted | |
parent | f33bbb1d7e1a650fd0ff628cd07bd95d25145eb5 (diff) | |
download | ydb-0992f8e13bc8aab92fcc68904ff895fb37b4730b.tar.gz |
Update contrib/restricted/boost/atomic to 1.84.0
Diffstat (limited to 'contrib/restricted')
20 files changed, 189 insertions, 120 deletions
diff --git a/contrib/restricted/boost/atomic/CMakeLists.darwin-arm64.txt b/contrib/restricted/boost/atomic/CMakeLists.darwin-arm64.txt index a5fe2fae98..bf35506fff 100644 --- a/contrib/restricted/boost/atomic/CMakeLists.darwin-arm64.txt +++ b/contrib/restricted/boost/atomic/CMakeLists.darwin-arm64.txt @@ -25,7 +25,6 @@ target_link_libraries(restricted-boost-atomic PUBLIC restricted-boost-config restricted-boost-predef restricted-boost-preprocessor - restricted-boost-static_assert restricted-boost-type_traits restricted-boost-winapi ) diff --git a/contrib/restricted/boost/atomic/CMakeLists.darwin-x86_64.txt b/contrib/restricted/boost/atomic/CMakeLists.darwin-x86_64.txt index 5afc02dce5..a45bcecbdf 100644 --- a/contrib/restricted/boost/atomic/CMakeLists.darwin-x86_64.txt +++ b/contrib/restricted/boost/atomic/CMakeLists.darwin-x86_64.txt @@ -26,7 +26,6 @@ target_link_libraries(restricted-boost-atomic PUBLIC restricted-boost-config restricted-boost-predef restricted-boost-preprocessor - restricted-boost-static_assert restricted-boost-type_traits restricted-boost-winapi ) diff --git a/contrib/restricted/boost/atomic/CMakeLists.linux-aarch64.txt b/contrib/restricted/boost/atomic/CMakeLists.linux-aarch64.txt index 38a28245e8..8acf55f664 100644 --- a/contrib/restricted/boost/atomic/CMakeLists.linux-aarch64.txt +++ b/contrib/restricted/boost/atomic/CMakeLists.linux-aarch64.txt @@ -26,7 +26,6 @@ target_link_libraries(restricted-boost-atomic PUBLIC restricted-boost-config restricted-boost-predef restricted-boost-preprocessor - restricted-boost-static_assert restricted-boost-type_traits restricted-boost-winapi ) diff --git a/contrib/restricted/boost/atomic/CMakeLists.linux-x86_64.txt b/contrib/restricted/boost/atomic/CMakeLists.linux-x86_64.txt index 6aef8821ed..91cd44e461 100644 --- a/contrib/restricted/boost/atomic/CMakeLists.linux-x86_64.txt +++ b/contrib/restricted/boost/atomic/CMakeLists.linux-x86_64.txt @@ -27,7 +27,6 @@ target_link_libraries(restricted-boost-atomic PUBLIC restricted-boost-config restricted-boost-predef restricted-boost-preprocessor - restricted-boost-static_assert restricted-boost-type_traits restricted-boost-winapi ) diff --git a/contrib/restricted/boost/atomic/CMakeLists.windows-x86_64.txt b/contrib/restricted/boost/atomic/CMakeLists.windows-x86_64.txt index ff9af7a397..f5663f2c61 100644 --- a/contrib/restricted/boost/atomic/CMakeLists.windows-x86_64.txt +++ b/contrib/restricted/boost/atomic/CMakeLists.windows-x86_64.txt @@ -26,7 +26,6 @@ target_link_libraries(restricted-boost-atomic PUBLIC restricted-boost-config restricted-boost-predef restricted-boost-preprocessor - restricted-boost-static_assert restricted-boost-type_traits restricted-boost-winapi ) diff --git a/contrib/restricted/boost/atomic/include/boost/atomic/atomic.hpp b/contrib/restricted/boost/atomic/include/boost/atomic/atomic.hpp index 126a0431bd..05cb979777 100644 --- a/contrib/restricted/boost/atomic/include/boost/atomic/atomic.hpp +++ b/contrib/restricted/boost/atomic/include/boost/atomic/atomic.hpp @@ -18,7 +18,6 @@ #include <cstddef> #include <boost/cstdint.hpp> -#include <boost/static_assert.hpp> #include <boost/memory_order.hpp> #include <boost/atomic/capabilities.hpp> #include <boost/atomic/detail/config.hpp> @@ -47,9 +46,9 @@ private: public: typedef typename base_type::value_type value_type; - BOOST_STATIC_ASSERT_MSG(sizeof(value_type) > 0u, "boost::atomic<T> requires T to be a complete type"); + static_assert(sizeof(value_type) > 0u, "boost::atomic<T> requires T to be a complete type"); #if !defined(BOOST_ATOMIC_DETAIL_NO_CXX11_IS_TRIVIALLY_COPYABLE) - BOOST_STATIC_ASSERT_MSG(atomics::detail::is_trivially_copyable< value_type >::value, "boost::atomic<T> requires T to be a trivially copyable type"); + static_assert(atomics::detail::is_trivially_copyable< value_type >::value, "boost::atomic<T> requires T to be a trivially copyable type"); #endif public: diff --git a/contrib/restricted/boost/atomic/include/boost/atomic/atomic_ref.hpp b/contrib/restricted/boost/atomic/include/boost/atomic/atomic_ref.hpp index dc388f0d2d..e7a8424788 100644 --- a/contrib/restricted/boost/atomic/include/boost/atomic/atomic_ref.hpp +++ b/contrib/restricted/boost/atomic/include/boost/atomic/atomic_ref.hpp @@ -15,7 +15,6 @@ #define BOOST_ATOMIC_ATOMIC_REF_HPP_INCLUDED_ #include <boost/assert.hpp> -#include <boost/static_assert.hpp> #include <boost/memory_order.hpp> #include <boost/atomic/capabilities.hpp> #include <boost/atomic/detail/config.hpp> @@ -44,9 +43,9 @@ private: public: typedef typename base_type::value_type value_type; - BOOST_STATIC_ASSERT_MSG(sizeof(value_type) > 0u, "boost::atomic_ref<T> requires T to be a complete type"); + static_assert(sizeof(value_type) > 0u, "boost::atomic_ref<T> requires T to be a complete type"); #if !defined(BOOST_ATOMIC_DETAIL_NO_CXX11_IS_TRIVIALLY_COPYABLE) - BOOST_STATIC_ASSERT_MSG(atomics::detail::is_trivially_copyable< value_type >::value, "boost::atomic_ref<T> requires T to be a trivially copyable type"); + static_assert(atomics::detail::is_trivially_copyable< value_type >::value, "boost::atomic_ref<T> requires T to be a trivially copyable type"); #endif private: diff --git a/contrib/restricted/boost/atomic/include/boost/atomic/detail/atomic_ref_impl.hpp b/contrib/restricted/boost/atomic/include/boost/atomic/detail/atomic_ref_impl.hpp index 086bdc1fac..82c3a00f01 100644 --- a/contrib/restricted/boost/atomic/include/boost/atomic/detail/atomic_ref_impl.hpp +++ b/contrib/restricted/boost/atomic/include/boost/atomic/detail/atomic_ref_impl.hpp @@ -77,7 +77,7 @@ protected: typedef atomics::detail::wait_operations< core_operations > wait_operations; typedef typename atomics::detail::conditional< sizeof(value_type) <= sizeof(void*), value_type, value_type const& >::type value_arg_type; typedef typename core_operations::storage_type storage_type; - BOOST_STATIC_ASSERT_MSG(sizeof(storage_type) == sizeof(value_type), "Boost.Atomic internal error: atomic_ref storage size doesn't match the value size"); + static_assert(sizeof(storage_type) == sizeof(value_type), "Boost.Atomic internal error: atomic_ref storage size doesn't match the value size"); public: static BOOST_CONSTEXPR_OR_CONST std::size_t required_alignment = atomics::detail::alignment_of< value_type >::value <= core_operations::storage_alignment ? core_operations::storage_alignment : atomics::detail::alignment_of< value_type >::value; diff --git a/contrib/restricted/boost/atomic/include/boost/atomic/detail/core_operations_emulated.hpp b/contrib/restricted/boost/atomic/include/boost/atomic/detail/core_operations_emulated.hpp index 03af21e727..0a3a03ec5b 100644 --- a/contrib/restricted/boost/atomic/include/boost/atomic/detail/core_operations_emulated.hpp +++ b/contrib/restricted/boost/atomic/include/boost/atomic/detail/core_operations_emulated.hpp @@ -15,7 +15,6 @@ #define BOOST_ATOMIC_DETAIL_CORE_OPERATIONS_EMULATED_HPP_INCLUDED_ #include <cstddef> -#include <boost/static_assert.hpp> #include <boost/memory_order.hpp> #include <boost/atomic/detail/config.hpp> #include <boost/atomic/detail/storage_traits.hpp> @@ -69,21 +68,21 @@ struct core_operations_emulated : static void store(storage_type volatile& storage, storage_type v, memory_order) BOOST_NOEXCEPT { - BOOST_STATIC_ASSERT_MSG(!is_interprocess, "Boost.Atomic: operation invoked on a non-lock-free inter-process atomic object"); + static_assert(!is_interprocess, "Boost.Atomic: operation invoked on a non-lock-free inter-process atomic object"); scoped_lock lock(&storage); const_cast< storage_type& >(storage) = v; } static storage_type load(storage_type const volatile& storage, memory_order) BOOST_NOEXCEPT { - BOOST_STATIC_ASSERT_MSG(!is_interprocess, "Boost.Atomic: operation invoked on a non-lock-free inter-process atomic object"); + static_assert(!is_interprocess, "Boost.Atomic: operation invoked on a non-lock-free inter-process atomic object"); scoped_lock lock(&storage); return const_cast< storage_type const& >(storage); } static storage_type fetch_add(storage_type volatile& storage, storage_type v, memory_order) BOOST_NOEXCEPT { - BOOST_STATIC_ASSERT_MSG(!is_interprocess, "Boost.Atomic: operation invoked on a non-lock-free inter-process atomic object"); + static_assert(!is_interprocess, "Boost.Atomic: operation invoked on a non-lock-free inter-process atomic object"); storage_type& s = const_cast< storage_type& >(storage); scoped_lock lock(&storage); storage_type old_val = s; @@ -93,7 +92,7 @@ struct core_operations_emulated : static storage_type fetch_sub(storage_type volatile& storage, storage_type v, memory_order) BOOST_NOEXCEPT { - BOOST_STATIC_ASSERT_MSG(!is_interprocess, "Boost.Atomic: operation invoked on a non-lock-free inter-process atomic object"); + static_assert(!is_interprocess, "Boost.Atomic: operation invoked on a non-lock-free inter-process atomic object"); storage_type& s = const_cast< storage_type& >(storage); scoped_lock lock(&storage); storage_type old_val = s; @@ -103,7 +102,7 @@ struct core_operations_emulated : static storage_type exchange(storage_type volatile& storage, storage_type v, memory_order) BOOST_NOEXCEPT { - BOOST_STATIC_ASSERT_MSG(!is_interprocess, "Boost.Atomic: operation invoked on a non-lock-free inter-process atomic object"); + static_assert(!is_interprocess, "Boost.Atomic: operation invoked on a non-lock-free inter-process atomic object"); storage_type& s = const_cast< storage_type& >(storage); scoped_lock lock(&storage); storage_type old_val = s; @@ -114,7 +113,7 @@ struct core_operations_emulated : static bool compare_exchange_strong( storage_type volatile& storage, storage_type& expected, storage_type desired, memory_order, memory_order) BOOST_NOEXCEPT { - BOOST_STATIC_ASSERT_MSG(!is_interprocess, "Boost.Atomic: operation invoked on a non-lock-free inter-process atomic object"); + static_assert(!is_interprocess, "Boost.Atomic: operation invoked on a non-lock-free inter-process atomic object"); storage_type& s = const_cast< storage_type& >(storage); scoped_lock lock(&storage); storage_type old_val = s; @@ -131,7 +130,7 @@ struct core_operations_emulated : { // Note: This function is the exact copy of compare_exchange_strong. The reason we're not just forwarding the call // is that MSVC-12 ICEs in this case. - BOOST_STATIC_ASSERT_MSG(!is_interprocess, "Boost.Atomic: operation invoked on a non-lock-free inter-process atomic object"); + static_assert(!is_interprocess, "Boost.Atomic: operation invoked on a non-lock-free inter-process atomic object"); storage_type& s = const_cast< storage_type& >(storage); scoped_lock lock(&storage); storage_type old_val = s; @@ -145,7 +144,7 @@ struct core_operations_emulated : static storage_type fetch_and(storage_type volatile& storage, storage_type v, memory_order) BOOST_NOEXCEPT { - BOOST_STATIC_ASSERT_MSG(!is_interprocess, "Boost.Atomic: operation invoked on a non-lock-free inter-process atomic object"); + static_assert(!is_interprocess, "Boost.Atomic: operation invoked on a non-lock-free inter-process atomic object"); storage_type& s = const_cast< storage_type& >(storage); scoped_lock lock(&storage); storage_type old_val = s; @@ -155,7 +154,7 @@ struct core_operations_emulated : static storage_type fetch_or(storage_type volatile& storage, storage_type v, memory_order) BOOST_NOEXCEPT { - BOOST_STATIC_ASSERT_MSG(!is_interprocess, "Boost.Atomic: operation invoked on a non-lock-free inter-process atomic object"); + static_assert(!is_interprocess, "Boost.Atomic: operation invoked on a non-lock-free inter-process atomic object"); storage_type& s = const_cast< storage_type& >(storage); scoped_lock lock(&storage); storage_type old_val = s; @@ -165,7 +164,7 @@ struct core_operations_emulated : static storage_type fetch_xor(storage_type volatile& storage, storage_type v, memory_order) BOOST_NOEXCEPT { - BOOST_STATIC_ASSERT_MSG(!is_interprocess, "Boost.Atomic: operation invoked on a non-lock-free inter-process atomic object"); + static_assert(!is_interprocess, "Boost.Atomic: operation invoked on a non-lock-free inter-process atomic object"); storage_type& s = const_cast< storage_type& >(storage); scoped_lock lock(&storage); storage_type old_val = s; @@ -175,13 +174,13 @@ struct core_operations_emulated : static BOOST_FORCEINLINE bool test_and_set(storage_type volatile& storage, memory_order order) BOOST_NOEXCEPT { - BOOST_STATIC_ASSERT_MSG(!is_interprocess, "Boost.Atomic: operation invoked on a non-lock-free inter-process atomic object"); + static_assert(!is_interprocess, "Boost.Atomic: operation invoked on a non-lock-free inter-process atomic object"); return !!exchange(storage, (storage_type)1, order); } static BOOST_FORCEINLINE void clear(storage_type volatile& storage, memory_order order) BOOST_NOEXCEPT { - BOOST_STATIC_ASSERT_MSG(!is_interprocess, "Boost.Atomic: operation invoked on a non-lock-free inter-process atomic object"); + static_assert(!is_interprocess, "Boost.Atomic: operation invoked on a non-lock-free inter-process atomic object"); store(storage, (storage_type)0, order); } }; diff --git a/contrib/restricted/boost/atomic/include/boost/atomic/detail/extra_fp_ops_emulated.hpp b/contrib/restricted/boost/atomic/include/boost/atomic/detail/extra_fp_ops_emulated.hpp index df556758c5..c809468a12 100644 --- a/contrib/restricted/boost/atomic/include/boost/atomic/detail/extra_fp_ops_emulated.hpp +++ b/contrib/restricted/boost/atomic/include/boost/atomic/detail/extra_fp_ops_emulated.hpp @@ -15,7 +15,6 @@ #define BOOST_ATOMIC_DETAIL_EXTRA_FP_OPS_EMULATED_HPP_INCLUDED_ #include <cstddef> -#include <boost/static_assert.hpp> #include <boost/memory_order.hpp> #include <boost/atomic/detail/config.hpp> #include <boost/atomic/detail/bitwise_fp_cast.hpp> @@ -42,7 +41,7 @@ struct extra_fp_operations_emulated : static value_type fetch_negate(storage_type volatile& storage, memory_order) BOOST_NOEXCEPT { - BOOST_STATIC_ASSERT_MSG(!base_type::is_interprocess, "Boost.Atomic: operation invoked on a non-lock-free inter-process atomic object"); + static_assert(!base_type::is_interprocess, "Boost.Atomic: operation invoked on a non-lock-free inter-process atomic object"); storage_type& s = const_cast< storage_type& >(storage); scoped_lock lock(&storage); value_type old_val = atomics::detail::bitwise_fp_cast< value_type >(s); @@ -53,7 +52,7 @@ struct extra_fp_operations_emulated : static value_type negate(storage_type volatile& storage, memory_order) BOOST_NOEXCEPT { - BOOST_STATIC_ASSERT_MSG(!base_type::is_interprocess, "Boost.Atomic: operation invoked on a non-lock-free inter-process atomic object"); + static_assert(!base_type::is_interprocess, "Boost.Atomic: operation invoked on a non-lock-free inter-process atomic object"); storage_type& s = const_cast< storage_type& >(storage); scoped_lock lock(&storage); value_type old_val = atomics::detail::bitwise_fp_cast< value_type >(s); @@ -64,7 +63,7 @@ struct extra_fp_operations_emulated : static value_type add(storage_type volatile& storage, value_type v, memory_order) BOOST_NOEXCEPT { - BOOST_STATIC_ASSERT_MSG(!base_type::is_interprocess, "Boost.Atomic: operation invoked on a non-lock-free inter-process atomic object"); + static_assert(!base_type::is_interprocess, "Boost.Atomic: operation invoked on a non-lock-free inter-process atomic object"); storage_type& s = const_cast< storage_type& >(storage); scoped_lock lock(&storage); value_type old_val = atomics::detail::bitwise_fp_cast< value_type >(s); @@ -75,7 +74,7 @@ struct extra_fp_operations_emulated : static value_type sub(storage_type volatile& storage, value_type v, memory_order) BOOST_NOEXCEPT { - BOOST_STATIC_ASSERT_MSG(!base_type::is_interprocess, "Boost.Atomic: operation invoked on a non-lock-free inter-process atomic object"); + static_assert(!base_type::is_interprocess, "Boost.Atomic: operation invoked on a non-lock-free inter-process atomic object"); storage_type& s = const_cast< storage_type& >(storage); scoped_lock lock(&storage); value_type old_val = atomics::detail::bitwise_fp_cast< value_type >(s); @@ -86,19 +85,19 @@ struct extra_fp_operations_emulated : static BOOST_FORCEINLINE void opaque_negate(storage_type volatile& storage, memory_order order) BOOST_NOEXCEPT { - BOOST_STATIC_ASSERT_MSG(!base_type::is_interprocess, "Boost.Atomic: operation invoked on a non-lock-free inter-process atomic object"); + static_assert(!base_type::is_interprocess, "Boost.Atomic: operation invoked on a non-lock-free inter-process atomic object"); fetch_negate(storage, order); } static BOOST_FORCEINLINE void opaque_add(storage_type volatile& storage, value_type v, memory_order order) BOOST_NOEXCEPT { - BOOST_STATIC_ASSERT_MSG(!base_type::is_interprocess, "Boost.Atomic: operation invoked on a non-lock-free inter-process atomic object"); + static_assert(!base_type::is_interprocess, "Boost.Atomic: operation invoked on a non-lock-free inter-process atomic object"); base_type::fetch_add(storage, v, order); } static BOOST_FORCEINLINE void opaque_sub(storage_type volatile& storage, value_type v, memory_order order) BOOST_NOEXCEPT { - BOOST_STATIC_ASSERT_MSG(!base_type::is_interprocess, "Boost.Atomic: operation invoked on a non-lock-free inter-process atomic object"); + static_assert(!base_type::is_interprocess, "Boost.Atomic: operation invoked on a non-lock-free inter-process atomic object"); base_type::fetch_sub(storage, v, order); } }; diff --git a/contrib/restricted/boost/atomic/include/boost/atomic/detail/extra_ops_emulated.hpp b/contrib/restricted/boost/atomic/include/boost/atomic/detail/extra_ops_emulated.hpp index 1de9a66fbb..6b3b058e57 100644 --- a/contrib/restricted/boost/atomic/include/boost/atomic/detail/extra_ops_emulated.hpp +++ b/contrib/restricted/boost/atomic/include/boost/atomic/detail/extra_ops_emulated.hpp @@ -15,7 +15,6 @@ #define BOOST_ATOMIC_DETAIL_EXTRA_OPS_EMULATED_HPP_INCLUDED_ #include <cstddef> -#include <boost/static_assert.hpp> #include <boost/memory_order.hpp> #include <boost/atomic/detail/config.hpp> #include <boost/atomic/detail/storage_traits.hpp> @@ -41,7 +40,7 @@ struct extra_operations_emulated : static storage_type fetch_negate(storage_type volatile& storage, memory_order) BOOST_NOEXCEPT { - BOOST_STATIC_ASSERT_MSG(!base_type::is_interprocess, "Boost.Atomic: operation invoked on a non-lock-free inter-process atomic object"); + static_assert(!base_type::is_interprocess, "Boost.Atomic: operation invoked on a non-lock-free inter-process atomic object"); storage_type& s = const_cast< storage_type& >(storage); scoped_lock lock(&storage); storage_type old_val = s; @@ -51,7 +50,7 @@ struct extra_operations_emulated : static storage_type negate(storage_type volatile& storage, memory_order) BOOST_NOEXCEPT { - BOOST_STATIC_ASSERT_MSG(!base_type::is_interprocess, "Boost.Atomic: operation invoked on a non-lock-free inter-process atomic object"); + static_assert(!base_type::is_interprocess, "Boost.Atomic: operation invoked on a non-lock-free inter-process atomic object"); storage_type& s = const_cast< storage_type& >(storage); scoped_lock lock(&storage); storage_type new_val = static_cast< storage_type >(-s); @@ -61,7 +60,7 @@ struct extra_operations_emulated : static storage_type add(storage_type volatile& storage, storage_type v, memory_order) BOOST_NOEXCEPT { - BOOST_STATIC_ASSERT_MSG(!base_type::is_interprocess, "Boost.Atomic: operation invoked on a non-lock-free inter-process atomic object"); + static_assert(!base_type::is_interprocess, "Boost.Atomic: operation invoked on a non-lock-free inter-process atomic object"); storage_type& s = const_cast< storage_type& >(storage); scoped_lock lock(&storage); storage_type new_val = s; @@ -72,7 +71,7 @@ struct extra_operations_emulated : static storage_type sub(storage_type volatile& storage, storage_type v, memory_order) BOOST_NOEXCEPT { - BOOST_STATIC_ASSERT_MSG(!base_type::is_interprocess, "Boost.Atomic: operation invoked on a non-lock-free inter-process atomic object"); + static_assert(!base_type::is_interprocess, "Boost.Atomic: operation invoked on a non-lock-free inter-process atomic object"); storage_type& s = const_cast< storage_type& >(storage); scoped_lock lock(&storage); storage_type new_val = s; @@ -83,7 +82,7 @@ struct extra_operations_emulated : static storage_type bitwise_and(storage_type volatile& storage, storage_type v, memory_order) BOOST_NOEXCEPT { - BOOST_STATIC_ASSERT_MSG(!base_type::is_interprocess, "Boost.Atomic: operation invoked on a non-lock-free inter-process atomic object"); + static_assert(!base_type::is_interprocess, "Boost.Atomic: operation invoked on a non-lock-free inter-process atomic object"); storage_type& s = const_cast< storage_type& >(storage); scoped_lock lock(&storage); storage_type new_val = s; @@ -94,7 +93,7 @@ struct extra_operations_emulated : static storage_type bitwise_or(storage_type volatile& storage, storage_type v, memory_order) BOOST_NOEXCEPT { - BOOST_STATIC_ASSERT_MSG(!base_type::is_interprocess, "Boost.Atomic: operation invoked on a non-lock-free inter-process atomic object"); + static_assert(!base_type::is_interprocess, "Boost.Atomic: operation invoked on a non-lock-free inter-process atomic object"); storage_type& s = const_cast< storage_type& >(storage); scoped_lock lock(&storage); storage_type new_val = s; @@ -105,7 +104,7 @@ struct extra_operations_emulated : static storage_type bitwise_xor(storage_type volatile& storage, storage_type v, memory_order) BOOST_NOEXCEPT { - BOOST_STATIC_ASSERT_MSG(!base_type::is_interprocess, "Boost.Atomic: operation invoked on a non-lock-free inter-process atomic object"); + static_assert(!base_type::is_interprocess, "Boost.Atomic: operation invoked on a non-lock-free inter-process atomic object"); storage_type& s = const_cast< storage_type& >(storage); scoped_lock lock(&storage); storage_type new_val = s; @@ -116,7 +115,7 @@ struct extra_operations_emulated : static storage_type fetch_complement(storage_type volatile& storage, memory_order) BOOST_NOEXCEPT { - BOOST_STATIC_ASSERT_MSG(!base_type::is_interprocess, "Boost.Atomic: operation invoked on a non-lock-free inter-process atomic object"); + static_assert(!base_type::is_interprocess, "Boost.Atomic: operation invoked on a non-lock-free inter-process atomic object"); storage_type& s = const_cast< storage_type& >(storage); scoped_lock lock(&storage); storage_type old_val = s; @@ -126,7 +125,7 @@ struct extra_operations_emulated : static storage_type bitwise_complement(storage_type volatile& storage, memory_order) BOOST_NOEXCEPT { - BOOST_STATIC_ASSERT_MSG(!base_type::is_interprocess, "Boost.Atomic: operation invoked on a non-lock-free inter-process atomic object"); + static_assert(!base_type::is_interprocess, "Boost.Atomic: operation invoked on a non-lock-free inter-process atomic object"); storage_type& s = const_cast< storage_type& >(storage); scoped_lock lock(&storage); storage_type new_val = static_cast< storage_type >(~s); @@ -136,91 +135,91 @@ struct extra_operations_emulated : static BOOST_FORCEINLINE void opaque_add(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { - BOOST_STATIC_ASSERT_MSG(!base_type::is_interprocess, "Boost.Atomic: operation invoked on a non-lock-free inter-process atomic object"); + static_assert(!base_type::is_interprocess, "Boost.Atomic: operation invoked on a non-lock-free inter-process atomic object"); base_type::fetch_add(storage, v, order); } static BOOST_FORCEINLINE void opaque_sub(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { - BOOST_STATIC_ASSERT_MSG(!base_type::is_interprocess, "Boost.Atomic: operation invoked on a non-lock-free inter-process atomic object"); + static_assert(!base_type::is_interprocess, "Boost.Atomic: operation invoked on a non-lock-free inter-process atomic object"); base_type::fetch_sub(storage, v, order); } static BOOST_FORCEINLINE void opaque_negate(storage_type volatile& storage, memory_order order) BOOST_NOEXCEPT { - BOOST_STATIC_ASSERT_MSG(!base_type::is_interprocess, "Boost.Atomic: operation invoked on a non-lock-free inter-process atomic object"); + static_assert(!base_type::is_interprocess, "Boost.Atomic: operation invoked on a non-lock-free inter-process atomic object"); fetch_negate(storage, order); } static BOOST_FORCEINLINE void opaque_and(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { - BOOST_STATIC_ASSERT_MSG(!base_type::is_interprocess, "Boost.Atomic: operation invoked on a non-lock-free inter-process atomic object"); + static_assert(!base_type::is_interprocess, "Boost.Atomic: operation invoked on a non-lock-free inter-process atomic object"); base_type::fetch_and(storage, v, order); } static BOOST_FORCEINLINE void opaque_or(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { - BOOST_STATIC_ASSERT_MSG(!base_type::is_interprocess, "Boost.Atomic: operation invoked on a non-lock-free inter-process atomic object"); + static_assert(!base_type::is_interprocess, "Boost.Atomic: operation invoked on a non-lock-free inter-process atomic object"); base_type::fetch_or(storage, v, order); } static BOOST_FORCEINLINE void opaque_xor(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { - BOOST_STATIC_ASSERT_MSG(!base_type::is_interprocess, "Boost.Atomic: operation invoked on a non-lock-free inter-process atomic object"); + static_assert(!base_type::is_interprocess, "Boost.Atomic: operation invoked on a non-lock-free inter-process atomic object"); base_type::fetch_xor(storage, v, order); } static BOOST_FORCEINLINE void opaque_complement(storage_type volatile& storage, memory_order order) BOOST_NOEXCEPT { - BOOST_STATIC_ASSERT_MSG(!base_type::is_interprocess, "Boost.Atomic: operation invoked on a non-lock-free inter-process atomic object"); + static_assert(!base_type::is_interprocess, "Boost.Atomic: operation invoked on a non-lock-free inter-process atomic object"); fetch_complement(storage, order); } static BOOST_FORCEINLINE bool add_and_test(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { - BOOST_STATIC_ASSERT_MSG(!base_type::is_interprocess, "Boost.Atomic: operation invoked on a non-lock-free inter-process atomic object"); + static_assert(!base_type::is_interprocess, "Boost.Atomic: operation invoked on a non-lock-free inter-process atomic object"); return !!add(storage, v, order); } static BOOST_FORCEINLINE bool sub_and_test(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { - BOOST_STATIC_ASSERT_MSG(!base_type::is_interprocess, "Boost.Atomic: operation invoked on a non-lock-free inter-process atomic object"); + static_assert(!base_type::is_interprocess, "Boost.Atomic: operation invoked on a non-lock-free inter-process atomic object"); return !!sub(storage, v, order); } static BOOST_FORCEINLINE bool negate_and_test(storage_type volatile& storage, memory_order order) BOOST_NOEXCEPT { - BOOST_STATIC_ASSERT_MSG(!base_type::is_interprocess, "Boost.Atomic: operation invoked on a non-lock-free inter-process atomic object"); + static_assert(!base_type::is_interprocess, "Boost.Atomic: operation invoked on a non-lock-free inter-process atomic object"); return !!negate(storage, order); } static BOOST_FORCEINLINE bool and_and_test(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { - BOOST_STATIC_ASSERT_MSG(!base_type::is_interprocess, "Boost.Atomic: operation invoked on a non-lock-free inter-process atomic object"); + static_assert(!base_type::is_interprocess, "Boost.Atomic: operation invoked on a non-lock-free inter-process atomic object"); return !!bitwise_and(storage, v, order); } static BOOST_FORCEINLINE bool or_and_test(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { - BOOST_STATIC_ASSERT_MSG(!base_type::is_interprocess, "Boost.Atomic: operation invoked on a non-lock-free inter-process atomic object"); + static_assert(!base_type::is_interprocess, "Boost.Atomic: operation invoked on a non-lock-free inter-process atomic object"); return !!bitwise_or(storage, v, order); } static BOOST_FORCEINLINE bool xor_and_test(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { - BOOST_STATIC_ASSERT_MSG(!base_type::is_interprocess, "Boost.Atomic: operation invoked on a non-lock-free inter-process atomic object"); + static_assert(!base_type::is_interprocess, "Boost.Atomic: operation invoked on a non-lock-free inter-process atomic object"); return !!bitwise_xor(storage, v, order); } static BOOST_FORCEINLINE bool complement_and_test(storage_type volatile& storage, memory_order order) BOOST_NOEXCEPT { - BOOST_STATIC_ASSERT_MSG(!base_type::is_interprocess, "Boost.Atomic: operation invoked on a non-lock-free inter-process atomic object"); + static_assert(!base_type::is_interprocess, "Boost.Atomic: operation invoked on a non-lock-free inter-process atomic object"); return !!bitwise_complement(storage, order); } static BOOST_FORCEINLINE bool bit_test_and_set(storage_type volatile& storage, unsigned int bit_number, memory_order order) BOOST_NOEXCEPT { - BOOST_STATIC_ASSERT_MSG(!base_type::is_interprocess, "Boost.Atomic: operation invoked on a non-lock-free inter-process atomic object"); + static_assert(!base_type::is_interprocess, "Boost.Atomic: operation invoked on a non-lock-free inter-process atomic object"); storage_type mask = static_cast< storage_type >(static_cast< storage_type >(1u) << bit_number); storage_type old_val = base_type::fetch_or(storage, mask, order); return !!(old_val & mask); @@ -228,7 +227,7 @@ struct extra_operations_emulated : static BOOST_FORCEINLINE bool bit_test_and_reset(storage_type volatile& storage, unsigned int bit_number, memory_order order) BOOST_NOEXCEPT { - BOOST_STATIC_ASSERT_MSG(!base_type::is_interprocess, "Boost.Atomic: operation invoked on a non-lock-free inter-process atomic object"); + static_assert(!base_type::is_interprocess, "Boost.Atomic: operation invoked on a non-lock-free inter-process atomic object"); storage_type mask = static_cast< storage_type >(static_cast< storage_type >(1u) << bit_number); storage_type old_val = base_type::fetch_and(storage, ~mask, order); return !!(old_val & mask); @@ -236,7 +235,7 @@ struct extra_operations_emulated : static BOOST_FORCEINLINE bool bit_test_and_complement(storage_type volatile& storage, unsigned int bit_number, memory_order order) BOOST_NOEXCEPT { - BOOST_STATIC_ASSERT_MSG(!base_type::is_interprocess, "Boost.Atomic: operation invoked on a non-lock-free inter-process atomic object"); + static_assert(!base_type::is_interprocess, "Boost.Atomic: operation invoked on a non-lock-free inter-process atomic object"); storage_type mask = static_cast< storage_type >(static_cast< storage_type >(1u) << bit_number); storage_type old_val = base_type::fetch_xor(storage, mask, order); return !!(old_val & mask); diff --git a/contrib/restricted/boost/atomic/include/boost/atomic/detail/float_sizes.hpp b/contrib/restricted/boost/atomic/include/boost/atomic/detail/float_sizes.hpp index 4c3a346f15..ea309a4502 100644 --- a/contrib/restricted/boost/atomic/include/boost/atomic/detail/float_sizes.hpp +++ b/contrib/restricted/boost/atomic/include/boost/atomic/detail/float_sizes.hpp @@ -3,7 +3,7 @@ * (See accompanying file LICENSE_1_0.txt or copy at * http://www.boost.org/LICENSE_1_0.txt) * - * Copyright (c) 2018 Andrey Semashev + * Copyright (c) 2018-2023 Andrey Semashev */ /*! * \file atomic/detail/float_sizes.hpp @@ -14,7 +14,6 @@ #ifndef BOOST_ATOMIC_DETAIL_FLOAT_SIZES_HPP_INCLUDED_ #define BOOST_ATOMIC_DETAIL_FLOAT_SIZES_HPP_INCLUDED_ -#include <float.h> #include <boost/atomic/detail/config.hpp> #ifdef BOOST_HAS_PRAGMA_ONCE @@ -22,88 +21,176 @@ #endif // Detect value sizes of the different floating point types. The value sizes may be less than the corresponding type sizes -// if the type contains padding bits. This is typical e.g. with 80-bit extended float types, which are often represented as 128-bit types. +// if the type contains padding bits. This is typical e.g. with x87 80-bit extended double types, which are often represented as 96 or 128-bit types. // See: https://en.wikipedia.org/wiki/IEEE_754 // For Intel x87 extended double see: https://en.wikipedia.org/wiki/Extended_precision#x86_Architecture_Extended_Precision_Format // For IBM extended double (a.k.a. double-double) see: https://en.wikipedia.org/wiki/Long_double#Implementations, https://gcc.gnu.org/wiki/Ieee128PowerPC -#if (FLT_RADIX+0) == 2 -#if ((FLT_MANT_DIG+0) == 11) && ((FLT_MAX_EXP+0) == 16) // IEEE 754 binary16 +#if defined(__FLT_RADIX__) && defined(__FLT_MANT_DIG__) && defined(__FLT_MAX_EXP__) && \ + defined(__DBL_MANT_DIG__) && defined(__DBL_MAX_EXP__) && defined(__LDBL_MANT_DIG__) && defined(__LDBL_MAX_EXP__) + +#if (__FLT_RADIX__ == 2) + +#if (__FLT_MANT_DIG__ == 11) && (__FLT_MAX_EXP__ == 16) // IEEE 754 binary16 #define BOOST_ATOMIC_DETAIL_SIZEOF_FLOAT_VALUE 2 -#elif ((FLT_MANT_DIG+0) == 24) && ((FLT_MAX_EXP+0) == 128) // IEEE 754 binary32 +#elif (__FLT_MANT_DIG__ == 24) && (__FLT_MAX_EXP__ == 128) // IEEE 754 binary32 #define BOOST_ATOMIC_DETAIL_SIZEOF_FLOAT_VALUE 4 -#elif ((FLT_MANT_DIG+0) == 53) && ((FLT_MAX_EXP+0) == 1024) // IEEE 754 binary64 +#elif (__FLT_MANT_DIG__ == 53) && (__FLT_MAX_EXP__ == 1024) // IEEE 754 binary64 #define BOOST_ATOMIC_DETAIL_SIZEOF_FLOAT_VALUE 8 -#elif ((FLT_MANT_DIG+0) == 64) && ((FLT_MAX_EXP+0) == 16384) // x87 extended double +#elif (__FLT_MANT_DIG__ == 64 || __FLT_MANT_DIG__ == 53 || __FLT_MANT_DIG__ == 24) && (__FLT_MAX_EXP__ == 16384) // x87 extended double, with full 64-bit significand or reduced to 53 or 24 bits #define BOOST_ATOMIC_DETAIL_SIZEOF_FLOAT_VALUE 10 -#elif ((FLT_MANT_DIG+0) == 106) && ((FLT_MAX_EXP+0) == 1024) // IBM extended double +#elif (__FLT_MANT_DIG__ == 106) && (__FLT_MAX_EXP__ == 1024) // IBM extended double #define BOOST_ATOMIC_DETAIL_SIZEOF_FLOAT_VALUE 16 -#elif ((FLT_MANT_DIG+0) == 113) && ((FLT_MAX_EXP+0) == 16384) // IEEE 754 binary128 +#elif (__FLT_MANT_DIG__ == 113) && (__FLT_MAX_EXP__ == 16384) // IEEE 754 binary128 #define BOOST_ATOMIC_DETAIL_SIZEOF_FLOAT_VALUE 16 -#elif ((FLT_MANT_DIG+0) == 237) && ((FLT_MAX_EXP+0) == 262144) // IEEE 754 binary256 +#elif (__FLT_MANT_DIG__ == 237) && (__FLT_MAX_EXP__ == 262144) // IEEE 754 binary256 #define BOOST_ATOMIC_DETAIL_SIZEOF_FLOAT_VALUE 32 #endif -#if ((DBL_MANT_DIG+0) == 11) && ((DBL_MAX_EXP+0) == 16) // IEEE 754 binary16 +#if (__DBL_MANT_DIG__ == 11) && (__DBL_MAX_EXP__ == 16) // IEEE 754 binary16 #define BOOST_ATOMIC_DETAIL_SIZEOF_DOUBLE_VALUE 2 -#elif ((DBL_MANT_DIG+0) == 24) && ((DBL_MAX_EXP+0) == 128) // IEEE 754 binary32 +#elif (__DBL_MANT_DIG__ == 24) && (__DBL_MAX_EXP__ == 128) // IEEE 754 binary32 #define BOOST_ATOMIC_DETAIL_SIZEOF_DOUBLE_VALUE 4 -#elif ((DBL_MANT_DIG+0) == 53) && ((DBL_MAX_EXP+0) == 1024) // IEEE 754 binary64 +#elif (__DBL_MANT_DIG__ == 53) && (__DBL_MAX_EXP__ == 1024) // IEEE 754 binary64 #define BOOST_ATOMIC_DETAIL_SIZEOF_DOUBLE_VALUE 8 -#elif ((DBL_MANT_DIG+0) == 64) && ((DBL_MAX_EXP+0) == 16384) // x87 extended double +#elif (__DBL_MANT_DIG__ == 64 || __DBL_MANT_DIG__ == 53 || __DBL_MANT_DIG__ == 24) && (__DBL_MAX_EXP__ == 16384) // x87 extended double, with full 64-bit significand or reduced to 53 or 24 bits #define BOOST_ATOMIC_DETAIL_SIZEOF_DOUBLE_VALUE 10 -#elif ((DBL_MANT_DIG+0) == 106) && ((DBL_MAX_EXP+0) == 1024) // IBM extended double +#elif (__DBL_MANT_DIG__ == 106) && (__DBL_MAX_EXP__ == 1024) // IBM extended double #define BOOST_ATOMIC_DETAIL_SIZEOF_DOUBLE_VALUE 16 -#elif ((DBL_MANT_DIG+0) == 113) && ((DBL_MAX_EXP+0) == 16384) // IEEE 754 binary128 +#elif (__DBL_MANT_DIG__ == 113) && (__DBL_MAX_EXP__ == 16384) // IEEE 754 binary128 #define BOOST_ATOMIC_DETAIL_SIZEOF_DOUBLE_VALUE 16 -#elif ((DBL_MANT_DIG+0) == 237) && ((DBL_MAX_EXP+0) == 262144) // IEEE 754 binary256 +#elif (__DBL_MANT_DIG__ == 237) && (__DBL_MAX_EXP__ == 262144) // IEEE 754 binary256 #define BOOST_ATOMIC_DETAIL_SIZEOF_DOUBLE_VALUE 32 #endif -#if ((LDBL_MANT_DIG+0) == 11) && ((LDBL_MAX_EXP+0) == 16) // IEEE 754 binary16 +#if (__LDBL_MANT_DIG__ == 11) && (__LDBL_MAX_EXP__ == 16) // IEEE 754 binary16 #define BOOST_ATOMIC_DETAIL_SIZEOF_LONG_DOUBLE_VALUE 2 -#elif ((LDBL_MANT_DIG+0) == 24) && ((LDBL_MAX_EXP+0) == 128) // IEEE 754 binary32 +#elif (__LDBL_MANT_DIG__ == 24) && (__LDBL_MAX_EXP__ == 128) // IEEE 754 binary32 #define BOOST_ATOMIC_DETAIL_SIZEOF_LONG_DOUBLE_VALUE 4 -#elif ((LDBL_MANT_DIG+0) == 53) && ((LDBL_MAX_EXP+0) == 1024) // IEEE 754 binary64 +#elif (__LDBL_MANT_DIG__ == 53) && (__LDBL_MAX_EXP__ == 1024) // IEEE 754 binary64 #define BOOST_ATOMIC_DETAIL_SIZEOF_LONG_DOUBLE_VALUE 8 -#elif ((LDBL_MANT_DIG+0) == 64) && ((LDBL_MAX_EXP+0) == 16384) // x87 extended double +#elif (__LDBL_MANT_DIG__ == 64 || __LDBL_MANT_DIG__ == 53 || __LDBL_MANT_DIG__ == 24) && (__LDBL_MAX_EXP__ == 16384) // x87 extended double, with full 64-bit significand or reduced to 53 or 24 bits #define BOOST_ATOMIC_DETAIL_SIZEOF_LONG_DOUBLE_VALUE 10 -#elif ((LDBL_MANT_DIG+0) == 106) && ((LDBL_MAX_EXP+0) == 1024) // IBM extended double +#elif (__LDBL_MANT_DIG__ == 106) && (__LDBL_MAX_EXP__ == 1024) // IBM extended double #define BOOST_ATOMIC_DETAIL_SIZEOF_LONG_DOUBLE_VALUE 16 -#elif ((LDBL_MANT_DIG+0) == 113) && ((LDBL_MAX_EXP+0) == 16384) // IEEE 754 binary128 +#elif (__LDBL_MANT_DIG__ == 113) && (__LDBL_MAX_EXP__ == 16384) // IEEE 754 binary128 #define BOOST_ATOMIC_DETAIL_SIZEOF_LONG_DOUBLE_VALUE 16 -#elif ((LDBL_MANT_DIG+0) == 237) && ((LDBL_MAX_EXP+0) == 262144) // IEEE 754 binary256 +#elif (__LDBL_MANT_DIG__ == 237) && (__LDBL_MAX_EXP__ == 262144) // IEEE 754 binary256 #define BOOST_ATOMIC_DETAIL_SIZEOF_LONG_DOUBLE_VALUE 32 #endif -#elif (FLT_RADIX+0) == 10 +#elif (__FLT_RADIX__ == 10) -#if ((FLT_MANT_DIG+0) == 7) && ((FLT_MAX_EXP+0) == 97) // IEEE 754 decimal32 +#if (__FLT_MANT_DIG__ == 7) && (__FLT_MAX_EXP__ == 97) // IEEE 754 decimal32 #define BOOST_ATOMIC_DETAIL_SIZEOF_FLOAT_VALUE 4 -#elif ((FLT_MANT_DIG+0) == 16) && ((FLT_MAX_EXP+0) == 385) // IEEE 754 decimal64 +#elif (__FLT_MANT_DIG__ == 16) && (__FLT_MAX_EXP__ == 385) // IEEE 754 decimal64 #define BOOST_ATOMIC_DETAIL_SIZEOF_FLOAT_VALUE 8 -#elif ((FLT_MANT_DIG+0) == 34) && ((FLT_MAX_EXP+0) == 6145) // IEEE 754 decimal128 +#elif (__FLT_MANT_DIG__ == 34) && (__FLT_MAX_EXP__ == 6145) // IEEE 754 decimal128 #define BOOST_ATOMIC_DETAIL_SIZEOF_FLOAT_VALUE 16 #endif -#if ((DBL_MANT_DIG+0) == 7) && ((DBL_MAX_EXP+0) == 97) // IEEE 754 decimal32 +#if (__DBL_MANT_DIG__ == 7) && (__DBL_MAX_EXP__ == 97) // IEEE 754 decimal32 #define BOOST_ATOMIC_DETAIL_SIZEOF_DOUBLE_VALUE 4 -#elif ((DBL_MANT_DIG+0) == 16) && ((DBL_MAX_EXP+0) == 385) // IEEE 754 decimal64 +#elif (__DBL_MANT_DIG__ == 16) && (__DBL_MAX_EXP__ == 385) // IEEE 754 decimal64 #define BOOST_ATOMIC_DETAIL_SIZEOF_DOUBLE_VALUE 8 -#elif ((DBL_MANT_DIG+0) == 34) && ((DBL_MAX_EXP+0) == 6145) // IEEE 754 decimal128 +#elif (__DBL_MANT_DIG__ == 34) && (__DBL_MAX_EXP__ == 6145) // IEEE 754 decimal128 #define BOOST_ATOMIC_DETAIL_SIZEOF_DOUBLE_VALUE 16 #endif -#if ((LDBL_MANT_DIG+0) == 7) && ((LDBL_MAX_EXP+0) == 97) // IEEE 754 decimal32 +#if (__LDBL_MANT_DIG__ == 7) && (__LDBL_MAX_EXP__ == 97) // IEEE 754 decimal32 #define BOOST_ATOMIC_DETAIL_SIZEOF_LONG_DOUBLE_VALUE 4 -#elif ((LDBL_MANT_DIG+0) == 16) && ((LDBL_MAX_EXP+0) == 385) // IEEE 754 decimal64 +#elif (__LDBL_MANT_DIG__ == 16) && (__LDBL_MAX_EXP__ == 385) // IEEE 754 decimal64 #define BOOST_ATOMIC_DETAIL_SIZEOF_LONG_DOUBLE_VALUE 8 -#elif ((LDBL_MANT_DIG+0) == 34) && ((LDBL_MAX_EXP+0) == 6145) // IEEE 754 decimal128 +#elif (__LDBL_MANT_DIG__ == 34) && (__LDBL_MAX_EXP__ == 6145) // IEEE 754 decimal128 #define BOOST_ATOMIC_DETAIL_SIZEOF_LONG_DOUBLE_VALUE 16 #endif #endif +#else // defined(__FLT_RADIX__) ... + +#include <cfloat> + +#if (FLT_RADIX == 2) + +#if (FLT_MANT_DIG == 11) && (FLT_MAX_EXP == 16) // IEEE 754 binary16 +#define BOOST_ATOMIC_DETAIL_SIZEOF_FLOAT_VALUE 2 +#elif (FLT_MANT_DIG == 24) && (FLT_MAX_EXP == 128) // IEEE 754 binary32 +#define BOOST_ATOMIC_DETAIL_SIZEOF_FLOAT_VALUE 4 +#elif (FLT_MANT_DIG == 53) && (FLT_MAX_EXP == 1024) // IEEE 754 binary64 +#define BOOST_ATOMIC_DETAIL_SIZEOF_FLOAT_VALUE 8 +#elif (FLT_MANT_DIG == 64 || FLT_MANT_DIG == 53 || FLT_MANT_DIG == 24) && (FLT_MAX_EXP == 16384) // x87 extended double, with full 64-bit significand or reduced to 53 or 24 bits +#define BOOST_ATOMIC_DETAIL_SIZEOF_FLOAT_VALUE 10 +#elif (FLT_MANT_DIG == 106) && (FLT_MAX_EXP == 1024) // IBM extended double +#define BOOST_ATOMIC_DETAIL_SIZEOF_FLOAT_VALUE 16 +#elif (FLT_MANT_DIG == 113) && (FLT_MAX_EXP == 16384) // IEEE 754 binary128 +#define BOOST_ATOMIC_DETAIL_SIZEOF_FLOAT_VALUE 16 +#elif (FLT_MANT_DIG == 237) && (FLT_MAX_EXP == 262144) // IEEE 754 binary256 +#define BOOST_ATOMIC_DETAIL_SIZEOF_FLOAT_VALUE 32 +#endif + +#if (DBL_MANT_DIG == 11) && (DBL_MAX_EXP == 16) // IEEE 754 binary16 +#define BOOST_ATOMIC_DETAIL_SIZEOF_DOUBLE_VALUE 2 +#elif (DBL_MANT_DIG == 24) && (DBL_MAX_EXP == 128) // IEEE 754 binary32 +#define BOOST_ATOMIC_DETAIL_SIZEOF_DOUBLE_VALUE 4 +#elif (DBL_MANT_DIG == 53) && (DBL_MAX_EXP == 1024) // IEEE 754 binary64 +#define BOOST_ATOMIC_DETAIL_SIZEOF_DOUBLE_VALUE 8 +#elif (DBL_MANT_DIG == 64 || DBL_MANT_DIG == 53 || DBL_MANT_DIG == 24) && (DBL_MAX_EXP == 16384) // x87 extended double, with full 64-bit significand or reduced to 53 or 24 bits +#define BOOST_ATOMIC_DETAIL_SIZEOF_DOUBLE_VALUE 10 +#elif (DBL_MANT_DIG == 106) && (DBL_MAX_EXP == 1024) // IBM extended double +#define BOOST_ATOMIC_DETAIL_SIZEOF_DOUBLE_VALUE 16 +#elif (DBL_MANT_DIG == 113) && (DBL_MAX_EXP == 16384) // IEEE 754 binary128 +#define BOOST_ATOMIC_DETAIL_SIZEOF_DOUBLE_VALUE 16 +#elif (DBL_MANT_DIG == 237) && (DBL_MAX_EXP == 262144) // IEEE 754 binary256 +#define BOOST_ATOMIC_DETAIL_SIZEOF_DOUBLE_VALUE 32 +#endif + +#if (LDBL_MANT_DIG == 11) && (LDBL_MAX_EXP == 16) // IEEE 754 binary16 +#define BOOST_ATOMIC_DETAIL_SIZEOF_LONG_DOUBLE_VALUE 2 +#elif (LDBL_MANT_DIG == 24) && (LDBL_MAX_EXP == 128) // IEEE 754 binary32 +#define BOOST_ATOMIC_DETAIL_SIZEOF_LONG_DOUBLE_VALUE 4 +#elif (LDBL_MANT_DIG == 53) && (LDBL_MAX_EXP == 1024) // IEEE 754 binary64 +#define BOOST_ATOMIC_DETAIL_SIZEOF_LONG_DOUBLE_VALUE 8 +#elif (LDBL_MANT_DIG == 64 || LDBL_MANT_DIG == 53 || LDBL_MANT_DIG == 24) && (LDBL_MAX_EXP == 16384) // x87 extended double, with full 64-bit significand or reduced to 53 or 24 bits +#define BOOST_ATOMIC_DETAIL_SIZEOF_LONG_DOUBLE_VALUE 10 +#elif (LDBL_MANT_DIG == 106) && (LDBL_MAX_EXP == 1024) // IBM extended double +#define BOOST_ATOMIC_DETAIL_SIZEOF_LONG_DOUBLE_VALUE 16 +#elif (LDBL_MANT_DIG == 113) && (LDBL_MAX_EXP == 16384) // IEEE 754 binary128 +#define BOOST_ATOMIC_DETAIL_SIZEOF_LONG_DOUBLE_VALUE 16 +#elif (LDBL_MANT_DIG == 237) && (LDBL_MAX_EXP == 262144) // IEEE 754 binary256 +#define BOOST_ATOMIC_DETAIL_SIZEOF_LONG_DOUBLE_VALUE 32 +#endif + +#elif (FLT_RADIX == 10) + +#if (FLT_MANT_DIG == 7) && (FLT_MAX_EXP == 97) // IEEE 754 decimal32 +#define BOOST_ATOMIC_DETAIL_SIZEOF_FLOAT_VALUE 4 +#elif (FLT_MANT_DIG == 16) && (FLT_MAX_EXP == 385) // IEEE 754 decimal64 +#define BOOST_ATOMIC_DETAIL_SIZEOF_FLOAT_VALUE 8 +#elif (FLT_MANT_DIG == 34) && (FLT_MAX_EXP == 6145) // IEEE 754 decimal128 +#define BOOST_ATOMIC_DETAIL_SIZEOF_FLOAT_VALUE 16 +#endif + +#if (DBL_MANT_DIG == 7) && (DBL_MAX_EXP == 97) // IEEE 754 decimal32 +#define BOOST_ATOMIC_DETAIL_SIZEOF_DOUBLE_VALUE 4 +#elif (DBL_MANT_DIG == 16) && (DBL_MAX_EXP == 385) // IEEE 754 decimal64 +#define BOOST_ATOMIC_DETAIL_SIZEOF_DOUBLE_VALUE 8 +#elif (DBL_MANT_DIG == 34) && (DBL_MAX_EXP == 6145) // IEEE 754 decimal128 +#define BOOST_ATOMIC_DETAIL_SIZEOF_DOUBLE_VALUE 16 +#endif + +#if (LDBL_MANT_DIG == 7) && (LDBL_MAX_EXP == 97) // IEEE 754 decimal32 +#define BOOST_ATOMIC_DETAIL_SIZEOF_LONG_DOUBLE_VALUE 4 +#elif (LDBL_MANT_DIG == 16) && (LDBL_MAX_EXP == 385) // IEEE 754 decimal64 +#define BOOST_ATOMIC_DETAIL_SIZEOF_LONG_DOUBLE_VALUE 8 +#elif (LDBL_MANT_DIG == 34) && (LDBL_MAX_EXP == 6145) // IEEE 754 decimal128 +#define BOOST_ATOMIC_DETAIL_SIZEOF_LONG_DOUBLE_VALUE 16 +#endif + +#endif + +#endif // defined(__FLT_RADIX__) ... + // GCC and compatible compilers define internal macros with builtin type traits #if defined(__SIZEOF_FLOAT__) #define BOOST_ATOMIC_DETAIL_SIZEOF_FLOAT __SIZEOF_FLOAT__ diff --git a/contrib/restricted/boost/atomic/include/boost/atomic/detail/fp_ops_emulated.hpp b/contrib/restricted/boost/atomic/include/boost/atomic/detail/fp_ops_emulated.hpp index d9d77e33e7..0a591aa9fd 100644 --- a/contrib/restricted/boost/atomic/include/boost/atomic/detail/fp_ops_emulated.hpp +++ b/contrib/restricted/boost/atomic/include/boost/atomic/detail/fp_ops_emulated.hpp @@ -15,7 +15,6 @@ #define BOOST_ATOMIC_DETAIL_FP_OPS_EMULATED_HPP_INCLUDED_ #include <cstddef> -#include <boost/static_assert.hpp> #include <boost/memory_order.hpp> #include <boost/atomic/detail/config.hpp> #include <boost/atomic/detail/bitwise_fp_cast.hpp> @@ -42,7 +41,7 @@ struct fp_operations_emulated : static value_type fetch_add(storage_type volatile& storage, value_type v, memory_order) BOOST_NOEXCEPT { - BOOST_STATIC_ASSERT_MSG(!base_type::is_interprocess, "Boost.Atomic: operation invoked on a non-lock-free inter-process atomic object"); + static_assert(!base_type::is_interprocess, "Boost.Atomic: operation invoked on a non-lock-free inter-process atomic object"); storage_type& s = const_cast< storage_type& >(storage); scoped_lock lock(&storage); value_type old_val = atomics::detail::bitwise_fp_cast< value_type >(s); @@ -53,7 +52,7 @@ struct fp_operations_emulated : static value_type fetch_sub(storage_type volatile& storage, value_type v, memory_order) BOOST_NOEXCEPT { - BOOST_STATIC_ASSERT_MSG(!base_type::is_interprocess, "Boost.Atomic: operation invoked on a non-lock-free inter-process atomic object"); + static_assert(!base_type::is_interprocess, "Boost.Atomic: operation invoked on a non-lock-free inter-process atomic object"); storage_type& s = const_cast< storage_type& >(storage); scoped_lock lock(&storage); value_type old_val = atomics::detail::bitwise_fp_cast< value_type >(s); diff --git a/contrib/restricted/boost/atomic/include/boost/atomic/detail/wait_on_address.hpp b/contrib/restricted/boost/atomic/include/boost/atomic/detail/wait_on_address.hpp index a09734f3ba..a28c7d5ccc 100644 --- a/contrib/restricted/boost/atomic/include/boost/atomic/detail/wait_on_address.hpp +++ b/contrib/restricted/boost/atomic/include/boost/atomic/detail/wait_on_address.hpp @@ -15,7 +15,6 @@ #define BOOST_ATOMIC_DETAIL_WAIT_ON_ADDRESS_HPP_INCLUDED_ #include <boost/atomic/detail/config.hpp> -#include <boost/static_assert.hpp> #include <boost/memory_order.hpp> #include <boost/winapi/basic_types.hpp> #include <boost/atomic/detail/link.hpp> @@ -49,7 +48,7 @@ BOOST_ATOMIC_DECL void initialize_wait_functions() BOOST_NOEXCEPT; BOOST_FORCEINLINE void ensure_wait_functions_initialized() BOOST_NOEXCEPT { - BOOST_STATIC_ASSERT_MSG(once_flag_operations::is_always_lock_free, "Boost.Atomic unsupported target platform: native atomic operations not implemented for bytes"); + static_assert(once_flag_operations::is_always_lock_free, "Boost.Atomic unsupported target platform: native atomic operations not implemented for bytes"); if (BOOST_LIKELY(once_flag_operations::load(wait_functions_once_flag.m_flag, boost::memory_order_acquire) == 0u)) return; diff --git a/contrib/restricted/boost/atomic/include/boost/atomic/detail/wait_ops_emulated.hpp b/contrib/restricted/boost/atomic/include/boost/atomic/detail/wait_ops_emulated.hpp index 75c0354817..209ff2ce72 100644 --- a/contrib/restricted/boost/atomic/include/boost/atomic/detail/wait_ops_emulated.hpp +++ b/contrib/restricted/boost/atomic/include/boost/atomic/detail/wait_ops_emulated.hpp @@ -15,7 +15,6 @@ #define BOOST_ATOMIC_DETAIL_WAIT_OPS_EMULATED_HPP_INCLUDED_ #include <cstddef> -#include <boost/static_assert.hpp> #include <boost/memory_order.hpp> #include <boost/atomic/detail/config.hpp> #include <boost/atomic/detail/lock_pool.hpp> @@ -54,7 +53,7 @@ struct wait_operations_emulated : #endif storage_type wait(storage_type const volatile& storage, storage_type old_val, memory_order) BOOST_NOEXCEPT { - BOOST_STATIC_ASSERT_MSG(!base_type::is_interprocess, "Boost.Atomic: operation invoked on a non-lock-free inter-process atomic object"); + static_assert(!base_type::is_interprocess, "Boost.Atomic: operation invoked on a non-lock-free inter-process atomic object"); storage_type const& s = const_cast< storage_type const& >(storage); scoped_wait_state wait_state(&storage); storage_type new_val = s; @@ -69,14 +68,14 @@ struct wait_operations_emulated : static void notify_one(storage_type volatile& storage) BOOST_NOEXCEPT { - BOOST_STATIC_ASSERT_MSG(!base_type::is_interprocess, "Boost.Atomic: operation invoked on a non-lock-free inter-process atomic object"); + static_assert(!base_type::is_interprocess, "Boost.Atomic: operation invoked on a non-lock-free inter-process atomic object"); scoped_lock lock(&storage); lock_pool::notify_one(lock.get_lock_state(), &storage); } static void notify_all(storage_type volatile& storage) BOOST_NOEXCEPT { - BOOST_STATIC_ASSERT_MSG(!base_type::is_interprocess, "Boost.Atomic: operation invoked on a non-lock-free inter-process atomic object"); + static_assert(!base_type::is_interprocess, "Boost.Atomic: operation invoked on a non-lock-free inter-process atomic object"); scoped_lock lock(&storage); lock_pool::notify_all(lock.get_lock_state(), &storage); } diff --git a/contrib/restricted/boost/atomic/include/boost/atomic/ipc_atomic.hpp b/contrib/restricted/boost/atomic/include/boost/atomic/ipc_atomic.hpp index d5e4bfbbf8..41b25a4088 100644 --- a/contrib/restricted/boost/atomic/include/boost/atomic/ipc_atomic.hpp +++ b/contrib/restricted/boost/atomic/include/boost/atomic/ipc_atomic.hpp @@ -15,7 +15,6 @@ #define BOOST_ATOMIC_IPC_ATOMIC_HPP_INCLUDED_ #include <cstddef> -#include <boost/static_assert.hpp> #include <boost/memory_order.hpp> #include <boost/atomic/capabilities.hpp> #include <boost/atomic/detail/config.hpp> @@ -44,9 +43,9 @@ private: public: typedef typename base_type::value_type value_type; - BOOST_STATIC_ASSERT_MSG(sizeof(value_type) > 0u, "boost::ipc_atomic<T> requires T to be a complete type"); + static_assert(sizeof(value_type) > 0u, "boost::ipc_atomic<T> requires T to be a complete type"); #if !defined(BOOST_ATOMIC_DETAIL_NO_CXX11_IS_TRIVIALLY_COPYABLE) - BOOST_STATIC_ASSERT_MSG(atomics::detail::is_trivially_copyable< value_type >::value, "boost::ipc_atomic<T> requires T to be a trivially copyable type"); + static_assert(atomics::detail::is_trivially_copyable< value_type >::value, "boost::ipc_atomic<T> requires T to be a trivially copyable type"); #endif public: diff --git a/contrib/restricted/boost/atomic/include/boost/atomic/ipc_atomic_ref.hpp b/contrib/restricted/boost/atomic/include/boost/atomic/ipc_atomic_ref.hpp index 9a8df18712..6088003dec 100644 --- a/contrib/restricted/boost/atomic/include/boost/atomic/ipc_atomic_ref.hpp +++ b/contrib/restricted/boost/atomic/include/boost/atomic/ipc_atomic_ref.hpp @@ -15,7 +15,6 @@ #define BOOST_ATOMIC_IPC_ATOMIC_REF_HPP_INCLUDED_ #include <boost/assert.hpp> -#include <boost/static_assert.hpp> #include <boost/memory_order.hpp> #include <boost/atomic/capabilities.hpp> #include <boost/atomic/detail/config.hpp> @@ -44,9 +43,9 @@ private: public: typedef typename base_type::value_type value_type; - BOOST_STATIC_ASSERT_MSG(sizeof(value_type) > 0u, "boost::ipc_atomic_ref<T> requires T to be a complete type"); + static_assert(sizeof(value_type) > 0u, "boost::ipc_atomic_ref<T> requires T to be a complete type"); #if !defined(BOOST_ATOMIC_DETAIL_NO_CXX11_IS_TRIVIALLY_COPYABLE) - BOOST_STATIC_ASSERT_MSG(atomics::detail::is_trivially_copyable< value_type >::value, "boost::ipc_atomic_ref<T> requires T to be a trivially copyable type"); + static_assert(atomics::detail::is_trivially_copyable< value_type >::value, "boost::ipc_atomic_ref<T> requires T to be a trivially copyable type"); #endif private: diff --git a/contrib/restricted/boost/atomic/src/lock_pool.cpp b/contrib/restricted/boost/atomic/src/lock_pool.cpp index 7424338997..adbea62526 100644 --- a/contrib/restricted/boost/atomic/src/lock_pool.cpp +++ b/contrib/restricted/boost/atomic/src/lock_pool.cpp @@ -28,7 +28,6 @@ #include <limits> #include <boost/config.hpp> #include <boost/assert.hpp> -#include <boost/static_assert.hpp> #include <boost/memory_order.hpp> #include <boost/atomic/capabilities.hpp> #include <boost/atomic/detail/config.hpp> @@ -119,7 +118,7 @@ namespace { #if BOOST_ARCH_X86 && (defined(BOOST_ATOMIC_USE_SSE2) || defined(BOOST_ATOMIC_USE_SSE41)) && defined(BOOST_ATOMIC_DETAIL_SIZEOF_POINTER) && (BOOST_ATOMIC_DETAIL_SIZEOF_POINTER == 8 || BOOST_ATOMIC_DETAIL_SIZEOF_POINTER == 4) typedef atomics::detail::core_operations< sizeof(find_address_t*), false, false > func_ptr_operations; -BOOST_STATIC_ASSERT_MSG(func_ptr_operations::is_always_lock_free, "Boost.Atomic unsupported target platform: native atomic operations not implemented for function pointers"); +static_assert(func_ptr_operations::is_always_lock_free, "Boost.Atomic unsupported target platform: native atomic operations not implemented for function pointers"); #if defined(BOOST_ATOMIC_DETAIL_X86_USE_RUNTIME_DISPATCH) std::size_t find_address_dispatch(const volatile void* addr, const volatile void* const* addrs, std::size_t size); @@ -395,7 +394,7 @@ inline void wait_state::wait(lock_state& state) BOOST_NOEXCEPT typedef atomics::detail::core_operations< 4u, false, false > futex_operations; // The storage type must be a 32-bit object, as required by futex API -BOOST_STATIC_ASSERT_MSG(futex_operations::is_always_lock_free && sizeof(futex_operations::storage_type) == 4u, "Boost.Atomic unsupported target platform: native atomic operations not implemented for 32-bit integers"); +static_assert(futex_operations::is_always_lock_free && sizeof(futex_operations::storage_type) == 4u, "Boost.Atomic unsupported target platform: native atomic operations not implemented for 32-bit integers"); typedef atomics::detail::extra_operations< futex_operations, futex_operations::storage_size, futex_operations::is_signed > futex_extra_operations; namespace mutex_bits { @@ -639,7 +638,7 @@ inline void wait_state::wait(lock_state& state) BOOST_NOEXCEPT #else // BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN6 typedef atomics::detail::core_operations< 4u, false, false > mutex_operations; -BOOST_STATIC_ASSERT_MSG(mutex_operations::is_always_lock_free, "Boost.Atomic unsupported target platform: native atomic operations not implemented for 32-bit integers"); +static_assert(mutex_operations::is_always_lock_free, "Boost.Atomic unsupported target platform: native atomic operations not implemented for 32-bit integers"); namespace fallback_mutex_bits { @@ -1134,7 +1133,7 @@ void cleanup_lock_pool() } } -BOOST_STATIC_ASSERT_MSG(once_flag_operations::is_always_lock_free, "Boost.Atomic unsupported target platform: native atomic operations not implemented for bytes"); +static_assert(once_flag_operations::is_always_lock_free, "Boost.Atomic unsupported target platform: native atomic operations not implemented for bytes"); static once_flag g_pool_cleanup_registered = {}; //! Returns index of the lock pool entry for the given pointer value diff --git a/contrib/restricted/boost/atomic/src/wait_on_address.cpp b/contrib/restricted/boost/atomic/src/wait_on_address.cpp index 6f8a165530..9fc4b6d5fc 100644 --- a/contrib/restricted/boost/atomic/src/wait_on_address.cpp +++ b/contrib/restricted/boost/atomic/src/wait_on_address.cpp @@ -27,7 +27,6 @@ #if BOOST_WINAPI_PARTITION_DESKTOP || BOOST_WINAPI_PARTITION_SYSTEM -#include <boost/static_assert.hpp> #include <boost/memory_order.hpp> #include <boost/winapi/thread.hpp> #include <boost/winapi/get_proc_address.hpp> @@ -53,7 +52,7 @@ BOOST_ATOMIC_DECL once_flag wait_functions_once_flag = { 2u }; BOOST_ATOMIC_DECL void initialize_wait_functions() BOOST_NOEXCEPT { - BOOST_STATIC_ASSERT_MSG(once_flag_operations::is_always_lock_free, "Boost.Atomic unsupported target platform: native atomic operations not implemented for bytes"); + static_assert(once_flag_operations::is_always_lock_free, "Boost.Atomic unsupported target platform: native atomic operations not implemented for bytes"); once_flag_operations::storage_type old_val = once_flag_operations::load(wait_functions_once_flag.m_flag, boost::memory_order_acquire); while (true) diff --git a/contrib/restricted/boost/atomic/ya.make b/contrib/restricted/boost/atomic/ya.make index eb77be5a43..beac80ecb1 100644 --- a/contrib/restricted/boost/atomic/ya.make +++ b/contrib/restricted/boost/atomic/ya.make @@ -6,9 +6,9 @@ LICENSE(BSL-1.0) LICENSE_TEXTS(.yandex_meta/licenses.list.txt) -VERSION(1.83.0) +VERSION(1.84.0) -ORIGINAL_SOURCE(https://github.com/boostorg/atomic/archive/boost-1.83.0.tar.gz) +ORIGINAL_SOURCE(https://github.com/boostorg/atomic/archive/boost-1.84.0.tar.gz) PEERDIR( contrib/restricted/boost/align @@ -16,7 +16,6 @@ PEERDIR( contrib/restricted/boost/config contrib/restricted/boost/predef contrib/restricted/boost/preprocessor - contrib/restricted/boost/static_assert contrib/restricted/boost/type_traits contrib/restricted/boost/winapi ) |