From: khizmax Date: Sun, 16 Nov 2014 06:34:21 +0000 (+0300) Subject: Fix GC refactoring bugs X-Git-Tag: v2.0.0~82 X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=8c4030e2f5241dc872ee93c42594a8b906242713;p=libcds.git Fix GC refactoring bugs --- diff --git a/cds/gc/impl/dhp_decl.h b/cds/gc/impl/dhp_decl.h index 9fd8c8a0..e51554c7 100644 --- a/cds/gc/impl/dhp_decl.h +++ b/cds/gc/impl/dhp_decl.h @@ -155,7 +155,7 @@ namespace cds { namespace gc { Really, the result of f( toGuard.load() ) is assigned to the hazard pointer. */ template - T protect( atomics::atomic const& toGuard, Func f ) CDS_NOEXCEPT_( noexcept( Func( atomics::atomic().load(atomics::memory_order_relaxed)))) + T protect( atomics::atomic const& toGuard, Func f ) { T pCur = toGuard.load(atomics::memory_order_relaxed); T pRet; @@ -293,7 +293,7 @@ namespace cds { namespace gc { Actually, the result of f( toGuard.load() ) is assigned to the hazard pointer. */ template - T protect( size_t nIndex, atomics::atomic const& toGuard, Func f ) CDS_NOEXCEPT_( noexcept( Func( atomics::atomic().load(atomics::memory_order_relaxed)))) + T protect( size_t nIndex, atomics::atomic const& toGuard, Func f ) { T pRet; do { diff --git a/cds/gc/impl/hp_decl.h b/cds/gc/impl/hp_decl.h index 89b9cb97..1fd30d39 100644 --- a/cds/gc/impl/hp_decl.h +++ b/cds/gc/impl/hp_decl.h @@ -153,7 +153,7 @@ namespace cds { namespace gc { Really, the result of f( toGuard.load() ) is assigned to the hazard pointer. */ template - T protect( atomics::atomic const& toGuard, Func f ) CDS_NOEXCEPT_( noexcept( Func( atomics::atomic().load(atomics::memory_order_relaxed)))) + T protect( atomics::atomic const& toGuard, Func f ) { T pCur = toGuard.load(atomics::memory_order_relaxed); T pRet; @@ -289,7 +289,7 @@ namespace cds { namespace gc { Really, the result of f( toGuard.load() ) is assigned to the hazard pointer. */ template - T protect( size_t nIndex, atomics::atomic const& toGuard, Func f ) CDS_NOEXCEPT_( noexcept( Func( atomics::atomic().load(atomics::memory_order_relaxed)))) + T protect( size_t nIndex, atomics::atomic const& toGuard, Func f ) { T pRet; do { diff --git a/cds/intrusive/details/node_traits.h b/cds/intrusive/details/node_traits.h index 0bccc641..5099abd7 100644 --- a/cds/intrusive/details/node_traits.h +++ b/cds/intrusive/details/node_traits.h @@ -153,7 +153,7 @@ namespace cds { namespace intrusive { /// Functor converting container's node type to value type template struct node_to_value { - typename Container::value_type * operator()( typename Container::node_type * p ) + typename Container::value_type * operator()( typename Container::node_type * p ) const { typedef typename Container::node_traits node_traits; return node_traits::to_value_ptr( p );