From 7ce05c8ff0cd1641235293ceeb6bbbd2a660a546 Mon Sep 17 00:00:00 2001 From: Andrey Semashev Date: Thu, 15 Feb 2018 15:46:31 +0300 Subject: [PATCH] Extended the workaround for noexcept in defaulted constructors to clang 3.1. --- include/boost/atomic/detail/atomic_template.hpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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