Opened 5 years ago

Last modified 5 years ago

#9314 new Feature Requests

boost shared_ptr should use C++11 atomics when available

Reported by: anonymous Owned by: Peter Dimov
Milestone: To Be Determined Component: smart_ptr
Version: Boost 1.54.0 Severity: Problem
Keywords: Cc:


If a native assembly lock-free version is unavailable, boost should use native C++11 atomics if the library has them. This will far more reliably pick an efficient implementation for shared_ptr in cases where the optimized assembly version is unavailable and where sync support may be unavailable/not detected properly.

Change History (2)

comment:1 Changed 5 years ago by viboes

Component: Nonesmart_ptr
Owner: set to Peter Dimov

comment:2 Changed 5 years ago by Peter Dimov adds support for #define BOOST_SP_USE_STD_ATOMIC which forces std::atomic to be used. This will eventually become the default when std::atomic is autodetected to be present and working.

Note: See TracTickets for help on using tickets.