From d718d21d6b15b8ed6cbb444fb7a1fe14a21196ea Mon Sep 17 00:00:00 2001 From: Minmin Gong Date: Sun, 29 Jan 2017 22:01:00 -0800 Subject: [PATCH] Fix compiling problems under ClangC2. --- include/boost/smart_ptr/detail/sp_counted_base.hpp | 2 +- include/boost/smart_ptr/detail/sp_has_sync.hpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/boost/smart_ptr/detail/sp_counted_base.hpp b/include/boost/smart_ptr/detail/sp_counted_base.hpp index 83ede23..4386137 100644 --- a/include/boost/smart_ptr/detail/sp_counted_base.hpp +++ b/include/boost/smart_ptr/detail/sp_counted_base.hpp @@ -20,7 +20,7 @@ #include #include -#if defined( __clang__ ) && defined( __has_extension ) +#if !defined( __c2__ ) && defined( __clang__ ) && defined( __has_extension ) # if __has_extension( __c_atomic__ ) # define BOOST_SP_HAS_CLANG_C11_ATOMICS # endif diff --git a/include/boost/smart_ptr/detail/sp_has_sync.hpp b/include/boost/smart_ptr/detail/sp_has_sync.hpp index 16de21d..0c4727c 100644 --- a/include/boost/smart_ptr/detail/sp_has_sync.hpp +++ b/include/boost/smart_ptr/detail/sp_has_sync.hpp @@ -22,7 +22,7 @@ #ifndef BOOST_SP_NO_SYNC -#if defined( __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 ) +#if !defined( __c2__ ) && defined( __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 ) # define BOOST_SP_HAS_SYNC @@ -30,7 +30,7 @@ # define BOOST_SP_HAS_SYNC -#elif defined( __GNUC__ ) && ( __GNUC__ * 100 + __GNUC_MINOR__ >= 401 ) +#elif !defined( __c2__ ) && defined( __GNUC__ ) && ( __GNUC__ * 100 + __GNUC_MINOR__ >= 401 ) #define BOOST_SP_HAS_SYNC