summaryrefslogtreecommitdiff
path: root/boost/smart_ptr/detail/sp_counted_base.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/smart_ptr/detail/sp_counted_base.hpp')
-rw-r--r--boost/smart_ptr/detail/sp_counted_base.hpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/boost/smart_ptr/detail/sp_counted_base.hpp b/boost/smart_ptr/detail/sp_counted_base.hpp
index c4158920e3..0addf077d1 100644
--- a/boost/smart_ptr/detail/sp_counted_base.hpp
+++ b/boost/smart_ptr/detail/sp_counted_base.hpp
@@ -20,6 +20,12 @@
#include <boost/config.hpp>
#include <boost/smart_ptr/detail/sp_has_sync.hpp>
+#if defined( __clang__ ) && defined( __has_extension )
+# if __has_extension( __c_atomic__ )
+# define BOOST_SP_HAS_CLANG_C11_ATOMICS
+# endif
+#endif
+
#if defined( BOOST_SP_DISABLE_THREADS )
# include <boost/smart_ptr/detail/sp_counted_base_nt.hpp>
@@ -35,6 +41,9 @@
#elif defined( BOOST_DISABLE_THREADS ) && !defined( BOOST_SP_ENABLE_THREADS ) && !defined( BOOST_DISABLE_WIN32 )
# include <boost/smart_ptr/detail/sp_counted_base_nt.hpp>
+#elif defined( BOOST_SP_HAS_CLANG_C11_ATOMICS )
+# include <boost/smart_ptr/detail/sp_counted_base_clang.hpp>
+
#elif defined( __SNC__ )
# include <boost/smart_ptr/detail/sp_counted_base_snc_ps3.hpp>
@@ -79,4 +88,6 @@
#endif
+#undef BOOST_SP_HAS_CLANG_C11_ATOMICS
+
#endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_HPP_INCLUDED