Closed htfy96 closed 8 years ago
BOOST_NO_CXX11_HDR_ATOMIC
doesn't help: some clang versions provided <atomic>
, but the implementation was broken, so it couldn't be used. BOOST_NO_CXX11_HDR_ATOMIC
only tells that the header is there, but not that the implementation is valid
This one is stricter than currrent version:
#include <boost/config.hpp>
#if defined(BOOST_NO_CXX11_HDR_ATOMIC) && !defined(BOOST_LOCKFREE_NO_HDR_ATOMIC)
# define BOOST_LOCKFREE_NO_HDR_ATOMIC
#endif
could you send me a pull request?
The existence of
<atomic>
not only depends on the version of compiler, but also the version of standard library.When
detail/atomic.hpp
was created in this project, there was noBOOST_NO_CXX11_HDR_ATOMIC
(which was introduced around Sep, 2014?) inboost::config
. NowBOOST_NO_CXX11_HDR_ATOMIC
has been well tested and covers far more compilers thanBOOST_LOCKFREE_NO_HDR_ATOMIC
. So I think it's time to switch toBOOST_NO_CXX11_HDR_ATOMIC
.