Opened 9 years ago
Last modified 9 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: |
Description
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 by , 9 years ago
| Component: | None → smart_ptr |
|---|---|
| Owner: | set to |
comment:2 by , 9 years ago
Note:
See TracTickets
for help on using tickets.

https://github.com/boostorg/smart_ptr/commit/fed15ad8c50921cbfc0365156e4e4f4454dc1b91 adds support for
#define BOOST_SP_USE_STD_ATOMICwhich forcesstd::atomicto be used. This will eventually become the default whenstd::atomicis autodetected to be present and working.