From fbb851097fa800fa9f19d6936906af7777d90215 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Sat, 1 Mar 2014 02:14:56 +0200 Subject: [PATCH] Disable the std::atomic spinlock implementation on Clang --- include/boost/smart_ptr/detail/spinlock.hpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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