mirror of
https://github.com/boostorg/atomic.git
synced 2026-02-02 08:22:08 +00:00
This commit changes how storage alignment is enforced and ensures that the storage is sufficiently aligned for both atomic operations and direct access to the stored value. This allowed to implement the new value() accessor, which returns a reference to the stored value. This is unlike the previously available storage() accessor, which returns a reference to storage_type and requires users to cast the reference to value_type, which is potentially unsafe. The public storage() accessor is now deprecated in favor of value() and storage_type - in favor of value_type. The deprecation warnings can be disabled by defining BOOST_ATOMIC_SILENCE_STORAGE_DEPRECATION.