diff --git a/include/boost/smart_ptr/detail/spinlock.hpp b/include/boost/smart_ptr/detail/spinlock.hpp index deffb67..19f93d7 100644 --- a/include/boost/smart_ptr/detail/spinlock.hpp +++ b/include/boost/smart_ptr/detail/spinlock.hpp @@ -32,7 +32,13 @@ #include #if defined( BOOST_SP_USE_STD_ATOMIC ) -# include +# if !defined( __clang__ ) +# include +# else +// Clang (at least up to 3.4) can't compile spinlock_pool when +// using std::atomic, so substitute the __sync implementation instead. +# include +# endif #elif defined( BOOST_SP_USE_PTHREADS ) # include