What is the header for boost :: atomic

I want to use boost::atomic , but which header to include? no boost/atomic.hpp

+4
source share
2 answers

Boost.Atomic is not yet an official part of the promotion. If you still want to use it, you should get it from here . Alternatively, you can try Boost.Interprocess for atomic operations, rely on compiler-specific extensions such as gccs atomic operations ( __sync_val_compare_and_swap , etc.), Or, if C ++ 11 is an option, use std::atomic<T> , which is almost identical to boost::atomic<T> IIRC.

Edit: As always, these things are changing: Boost.Atomic become the official part of the upgrade with the current version 1.53.0. Now it is available as boost/atomic.hpp .

+6
source

Boost.Atomic is not yet accepted in boost. However, there is a boost / interprocess / detail / atomic.hpp function as a drilldown to the Boost.Interprocess implementation.

+1
source

All Articles