diff --git a/include/boost/atomic/detail/atomic_template.hpp b/include/boost/atomic/detail/atomic_template.hpp index cefc7bb..8c18fcd 100644 --- a/include/boost/atomic/detail/atomic_template.hpp +++ b/include/boost/atomic/detail/atomic_template.hpp @@ -114,10 +114,12 @@ template< typename T, typename U > struct classify< T U::*, false, false > { typedef void type; }; -#if defined(BOOST_INTEL) || (defined(BOOST_GCC) && (BOOST_GCC+0) < 40700) +#if defined(BOOST_INTEL) || (defined(BOOST_GCC) && (BOOST_GCC+0) < 40700) ||\ + (defined(BOOST_CLANG) && !defined(__apple_build_version__) && ((__clang_major__+0) * 100 + (__clang_minor__+0)) < 302) ||\ + (defined(__clang__) && defined(__apple_build_version__) && ((__clang_major__+0) * 100 + (__clang_minor__+0)) < 402) // Intel compiler (at least 18.0 update 1) breaks if noexcept specification is used in defaulted function declarations: // error: the default constructor of "boost::atomics::atomic" cannot be referenced -- it is a deleted function -// GCC 4.6 doesn't seem to support that either. +// GCC 4.6 doesn't seem to support that either. Clang 3.1 deduces wrong noexcept for the defaulted function and fails as well. #define BOOST_ATOMIC_DETAIL_DEF_NOEXCEPT_DECL #define BOOST_ATOMIC_DETAIL_DEF_NOEXCEPT_IMPL BOOST_NOEXCEPT #else