Revised noexcept expressions in back-off strategies
authorkhizmax <libcds.dev@gmail.com>
Wed, 26 Nov 2014 07:04:08 +0000 (10:04 +0300)
committerkhizmax <libcds.dev@gmail.com>
Wed, 26 Nov 2014 07:04:08 +0000 (10:04 +0300)
cds/algo/backoff_strategy.h
cds/intrusive/treiber_stack.h

index 6cb479e..c80ea82 100644 (file)
@@ -59,7 +59,7 @@ namespace cds {
             {}
 
             template <typename Predicate>
-            bool operator()(Predicate pr) CDS_NOEXCEPT_( noexcept(Predicate()()) )
+            bool operator()(Predicate pr) CDS_NOEXCEPT
             {
                 return pr();
             }
@@ -78,7 +78,7 @@ namespace cds {
             }
 
             template <typename Predicate>
-            bool operator()( Predicate pr ) CDS_NOEXCEPT_( noexcept( Predicate()() ) )
+            bool operator()( Predicate pr ) CDS_NOEXCEPT
             {
                 if ( pr() )
                     return true;
@@ -106,7 +106,7 @@ namespace cds {
             }
 
             template <typename Predicate>
-            bool operator()( Predicate pr ) CDS_NOEXCEPT_( noexcept( Predicate()() ) )
+            bool operator()( Predicate pr ) CDS_NOEXCEPT
             {
                 if ( pr() )
                     return true;
@@ -137,7 +137,7 @@ namespace cds {
             }
 
             template <typename Predicate>
-            bool operator()( Predicate pr ) CDS_NOEXCEPT_( noexcept( Predicate()() ) )
+            bool operator()( Predicate pr ) CDS_NOEXCEPT
             {
                 if ( pr() )
                     return true;
@@ -264,7 +264,7 @@ namespace cds {
             }
 
             template <typename Predicate>
-            bool operator()( Predicate pr ) CDS_NOEXCEPT_( noexcept(Predicate()()) && noexcept( spin_backoff()()) && noexcept( yield_backoff()()))
+            bool operator()( Predicate pr ) CDS_NOEXCEPT_(noexcept( spin_backoff()()) && noexcept( yield_backoff()()))
             {
                 if ( m_nExpCur <= m_nExpMax ) {
                     for ( size_t n = 0; n < m_nExpCur; ++n ) {
@@ -371,7 +371,7 @@ namespace cds {
             }
 
             template <typename Predicate>
-            bool operator()( Predicate pr ) const CDS_NOEXCEPT_( noexcept(Predicate()()))
+            bool operator()( Predicate pr ) const CDS_NOEXCEPT
             {
                 for ( unsigned int i = 0; i < m_nTimeout; i += 2 ) {
                     if ( pr() )
index 99c22cb..9ccaa87 100644 (file)
@@ -391,7 +391,7 @@ namespace cds { namespace intrusive {
                     }
 
                     // Wait for colliding operation
-                    bkoff( [&op]() -> bool { return op.nStatus.load( atomics::memory_order_acquire ) != op_busy; } );
+                    bkoff( [&op]() CDS_NOEXCEPT -> bool { return op.nStatus.load( atomics::memory_order_acquire ) != op_busy; } );
                     {
                         slot_scoped_lock l( slot.lock );
                         if ( slot.pRec == myRec )