Fixed noexcept args
[libcds.git] / cds / sync / spinlock.h
index 753fe07e7ae1d98995aa4025889bdaa1fb560ef8..b1dfe82810e9168ccb1e102a797e65ee0075c518 100644 (file)
@@ -1,4 +1,4 @@
-//$$CDS-header$$-2
+//$$CDS-header$$
 
 #ifndef CDSLIB_SYNC_SPINLOCK_H
 #define CDSLIB_SYNC_SPINLOCK_H
@@ -255,7 +255,7 @@ namespace cds {
             {}
 
             /// Construct object for specified state
-            reentrant_spin_lock( bool bLocked ) CDS_NOEXCEPT
+            explicit reentrant_spin_lock( bool bLocked )
                 : m_spin(0)
                 , m_OwnerId( OS::c_NullThreadId )
             {
@@ -287,7 +287,7 @@ namespace cds {
             }
 
             /// Try to lock the object
-            bool try_lock( unsigned int nTryCount ) CDS_NOEXCEPT_( noexcept( try_acquire( nTryCount ) ) )
+            bool try_lock( unsigned int nTryCount ) CDS_NOEXCEPT_( noexcept( std::declval<reentrant_spin_lock>().try_acquire( nTryCount )))
             {
                 thread_id tid = OS::get_current_thread_id();
                 if ( try_taken_lock( tid ) )
@@ -300,7 +300,7 @@ namespace cds {
             }
 
             /// Lock the object waits if it is busy
-            void lock() CDS_NOEXCEPT
+            void lock() CDS_NOEXCEPT_( noexcept( std::declval<reentrant_spin_lock>().acquire()))
             {
                 thread_id tid = OS::get_current_thread_id();
                 if ( !try_taken_lock( tid ) ) {