From 951dfb39baa5396bb823146e4ba5f70a15aefb8e Mon Sep 17 00:00:00 2001 From: khizmax Date: Wed, 24 Sep 2014 14:26:35 +0400 Subject: [PATCH] Remove CDS_NOEXCEPT_DEFAULTED macro --- cds/details/defs.h | 9 --------- cds/details/marked_ptr.h | 8 ++++---- cds/memory/michael/allocator.h | 22 +++++++++++----------- 3 files changed, 15 insertions(+), 24 deletions(-) diff --git a/cds/details/defs.h b/cds/details/defs.h index e7d164b0..6f6baebc 100644 --- a/cds/details/defs.h +++ b/cds/details/defs.h @@ -338,15 +338,6 @@ namespace cds {} #define CDS_NOEXCEPT CDS_NOEXCEPT_SUPPORT #define CDS_NOEXCEPT_( expr ) CDS_NOEXCEPT_SUPPORT_( expr ) -#ifndef CDS_NOEXCEPT_DEFAULTED - // Some compilers do not allow noexcept specification in defaulted function - // For example, GCC 4.6.x raise following error: - // void foo() noexcept = default - // error: function ‘foo’ defaulted on its first declaration must not have an exception-specification - // For such compiler empty CDS_NOEXCEPT_DEFAULTED must be defined -# define CDS_NOEXCEPT_DEFAULTED CDS_NOEXCEPT -# define CDS_NOEXCEPT_DEFAULTED_(expr) CDS_NOEXCEPT_( expr ) -#endif #ifdef CDS_CXX11_INLINE_NAMESPACE_SUPPORT # define CDS_CXX11_INLINE_NAMESPACE inline diff --git a/cds/details/marked_ptr.h b/cds/details/marked_ptr.h index b8218a53..ade4d3f8 100644 --- a/cds/details/marked_ptr.h +++ b/cds/details/marked_ptr.h @@ -53,13 +53,13 @@ namespace cds { } /// Copy constructor - marked_ptr( marked_ptr const& src ) CDS_NOEXCEPT_DEFAULTED = default; + marked_ptr( marked_ptr const& src ) CDS_NOEXCEPT = default; /// Copy-assignment operator - marked_ptr& operator =( marked_ptr const& p ) CDS_NOEXCEPT_DEFAULTED = default; + marked_ptr& operator =( marked_ptr const& p ) CDS_NOEXCEPT = default; # if !defined(CDS_DISABLE_DEFAULT_MOVE_CTOR) //@cond - marked_ptr( marked_ptr&& src ) CDS_NOEXCEPT_DEFAULTED = default; - marked_ptr& operator =( marked_ptr&& p ) CDS_NOEXCEPT_DEFAULTED = default; + marked_ptr( marked_ptr&& src ) CDS_NOEXCEPT = default; + marked_ptr& operator =( marked_ptr&& p ) CDS_NOEXCEPT = default; //@endcond # endif diff --git a/cds/memory/michael/allocator.h b/cds/memory/michael/allocator.h index 8681913a..8da141ef 100644 --- a/cds/memory/michael/allocator.h +++ b/cds/memory/michael/allocator.h @@ -967,12 +967,12 @@ namespace michael { , nCredits(0) {} - active_tag( active_tag const& ) CDS_NOEXCEPT_DEFAULTED = default; - ~active_tag() CDS_NOEXCEPT_DEFAULTED = default; - active_tag& operator=(active_tag const& ) CDS_NOEXCEPT_DEFAULTED = default; + active_tag( active_tag const& ) CDS_NOEXCEPT = default; + ~active_tag() CDS_NOEXCEPT = default; + active_tag& operator=(active_tag const& ) CDS_NOEXCEPT = default; # if !defined(CDS_DISABLE_DEFAULT_MOVE_CTOR) - active_tag( active_tag&& ) CDS_NOEXCEPT_DEFAULTED = default; - active_tag& operator=(active_tag&&) CDS_NOEXCEPT_DEFAULTED = default; + active_tag( active_tag&& ) CDS_NOEXCEPT = default; + active_tag& operator=(active_tag&&) CDS_NOEXCEPT = default; # endif /// Returns pointer to superblock descriptor @@ -1025,13 +1025,13 @@ namespace michael { : pDesc( nullptr ) {} // Clang 3.1: error: first argument to atomic operation must be a pointer to a trivially-copyable type - //active_tag() CDS_NOEXCEPT_DEFAULTED = default; - active_tag( active_tag const& ) CDS_NOEXCEPT_DEFAULTED = default; - ~active_tag() CDS_NOEXCEPT_DEFAULTED = default; - active_tag& operator=(active_tag const&) CDS_NOEXCEPT_DEFAULTED = default; + //active_tag() CDS_NOEXCEPT = default; + active_tag( active_tag const& ) CDS_NOEXCEPT = default; + ~active_tag() CDS_NOEXCEPT = default; + active_tag& operator=(active_tag const&) CDS_NOEXCEPT = default; # if !defined(CDS_DISABLE_DEFAULT_MOVE_CTOR) - active_tag( active_tag&& ) CDS_NOEXCEPT_DEFAULTED = default; - active_tag& operator=(active_tag&&) CDS_NOEXCEPT_DEFAULTED = default; + active_tag( active_tag&& ) CDS_NOEXCEPT = default; + active_tag& operator=(active_tag&&) CDS_NOEXCEPT = default; # endif superblock_desc * ptr() const { -- 2.34.1