diff --git a/doc/atomic.qbk b/doc/atomic.qbk index f159911..00da7b2 100644 --- a/doc/atomic.qbk +++ b/doc/atomic.qbk @@ -571,9 +571,6 @@ the `BOOST_ATOMIC_FLAG_INIT` macro, which is equivalent to `ATOMIC_FLAG_INIT`: boost::atomic_flag flag = BOOST_ATOMIC_FLAG_INIT; // constant initialization -This macro will only be implemented on a C++11 compiler. When this macro is not available, -the library defines `BOOST_ATOMIC_NO_ATOMIC_FLAG_INIT`. - [endsect] [section:interface_atomic_object Atomic objects] @@ -1526,13 +1523,6 @@ which can also be useful. Like the standard ones, the `*_LOCK_FREE` macros below [`BOOST_ATOMIC_INT128_LOCK_FREE`] [Indicate whether `atomic` is lock-free.] ] - [ - [`BOOST_ATOMIC_NO_ATOMIC_FLAG_INIT`] - [Defined after including `atomic_flag.hpp`, if the implementation - does not support the `BOOST_ATOMIC_FLAG_INIT` macro for static - initialization of `atomic_flag`. This macro is typically defined - for pre-C++11 compilers.] - ] [ [`BOOST_ATOMIC_NO_CLEAR_PADDING`] [Defined if the implementation does not support operating on types diff --git a/doc/changelog.qbk b/doc/changelog.qbk index 24c23e6..77650f4 100644 --- a/doc/changelog.qbk +++ b/doc/changelog.qbk @@ -15,6 +15,7 @@ * Support for Windows CE is deprecated and will be removed in a future release. * Added support for timed waiting operations. * Exposed `thread_pause` operation, which can be used as a backoff measure in spin loops. Added support for PowerPC and improved support for AArch64 in `thread_pause`. +* Removed `BOOST_ATOMIC_NO_ATOMIC_FLAG_INIT` macro definition. Since the library now requires C++11, `BOOST_ATOMIC_FLAG_INIT` is always supported. [heading Boost 1.87] diff --git a/test/api_test_helpers.hpp b/test/api_test_helpers.hpp index ac3f5b7..cde6c10 100644 --- a/test/api_test_helpers.hpp +++ b/test/api_test_helpers.hpp @@ -71,11 +71,7 @@ struct is_atomic_ref< boost::ipc_atomic_ref< T > > : template< typename Flag > inline void test_flag_api(void) { -#ifndef BOOST_ATOMIC_NO_ATOMIC_FLAG_INIT Flag f = BOOST_ATOMIC_FLAG_INIT; -#else - Flag f; -#endif BOOST_TEST( !f.test() ); BOOST_TEST( !f.test_and_set() ); diff --git a/test/ipc_wait_test_helpers.hpp b/test/ipc_wait_test_helpers.hpp index c1e9ad4..36f53bf 100644 --- a/test/ipc_wait_test_helpers.hpp +++ b/test/ipc_wait_test_helpers.hpp @@ -677,11 +677,7 @@ inline void test_wait_notify_api(T value1, T value2, T value3, int has_native_wa inline void test_flag_wait_notify_api() { #if BOOST_ATOMIC_FLAG_LOCK_FREE == 2 -#ifndef BOOST_ATOMIC_NO_ATOMIC_FLAG_INIT boost::ipc_atomic_flag f = BOOST_ATOMIC_FLAG_INIT; -#else - boost::ipc_atomic_flag f; -#endif bool received_value = f.wait(true); BOOST_TEST(!received_value); diff --git a/test/wait_test_helpers.hpp b/test/wait_test_helpers.hpp index 2d612c3..4c850ba 100644 --- a/test/wait_test_helpers.hpp +++ b/test/wait_test_helpers.hpp @@ -637,11 +637,7 @@ void test_wait_notify_api(T value1, T value2, T value3, int has_native_wait_noti inline void test_flag_wait_notify_api() { -#ifndef BOOST_ATOMIC_NO_ATOMIC_FLAG_INIT boost::atomic_flag f = BOOST_ATOMIC_FLAG_INIT; -#else - boost::atomic_flag f; -#endif bool received_value = f.wait(true); BOOST_TEST(!received_value);