More noexcept for standard mutex types and locks
authorJonathan Wakely <jwakely@redhat.com>
Tue, 11 Oct 2016 10:33:16 +0000 (11:33 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Tue, 11 Oct 2016 10:33:16 +0000 (11:33 +0100)
* include/bits/std_mutex.h (mutex::native_handle)
(lock_guard(mutex_type&, adopt_lock_t)
(unique_lock(mutex_type&, adopt_lock_t): Add noexcept.
* include/std/mutex (recursive_mutex, timed_mutex)
(recursive_timed_mutex): Likewise.

From-SVN: r240980

libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/std_mutex.h
libstdc++-v3/include/std/mutex

index 5016ca7a392441a0bde2094d4ff1c54564087783..7743e09cc46aa6a77116e367ad6a45847bc5ed63 100644 (file)
@@ -1,3 +1,11 @@
+2016-10-11  Jonathan Wakely  <jwakely@redhat.com>
+
+       * include/bits/std_mutex.h (mutex::native_handle)
+       (lock_guard(mutex_type&, adopt_lock_t)
+       (unique_lock(mutex_type&, adopt_lock_t): Add noexcept.
+       * include/std/mutex (recursive_mutex, timed_mutex)
+       (recursive_timed_mutex): Likewise.
+
 2016-10-10  Jonathan Wakely  <jwakely@redhat.com>
 
        * doc/xml/manual/appendix_contributing.xml (contrib.organization):
index 49ef752a4e314c5caec79db908186651a2a2de51..ad43841b9f4e90e3f80c094bcdddd8d8726566d1 100644 (file)
@@ -122,7 +122,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
     }
 
     native_handle_type
-    native_handle()
+    native_handle() noexcept
     { return &_M_mutex; }
   };
 
@@ -161,7 +161,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
       explicit lock_guard(mutex_type& __m) : _M_device(__m)
       { _M_device.lock(); }
 
-      lock_guard(mutex_type& __m, adopt_lock_t) : _M_device(__m)
+      lock_guard(mutex_type& __m, adopt_lock_t) noexcept : _M_device(__m)
       { } // calling thread owns mutex
 
       ~lock_guard()
@@ -206,7 +206,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
       : _M_device(std::__addressof(__m)), _M_owns(_M_device->try_lock())
       { }
 
-      unique_lock(mutex_type& __m, adopt_lock_t)
+      unique_lock(mutex_type& __m, adopt_lock_t) noexcept
       : _M_device(std::__addressof(__m)), _M_owns(true)
       {
        // XXX calling thread owns mutex
index 1f4da574513188385177d8b2e51ed316115155c9..7a7bd2eb13e87068697fd375b72934d10c60a5ca 100644 (file)
@@ -124,7 +124,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
     }
 
     native_handle_type
-    native_handle()
+    native_handle() noexcept
     { return &_M_mutex; }
   };
 
@@ -219,7 +219,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
     }
 
     native_handle_type
-    native_handle()
+    native_handle() noexcept
     { return &_M_mutex; }
 
     private:
@@ -279,7 +279,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
     }
 
     native_handle_type
-    native_handle()
+    native_handle() noexcept
     { return &_M_mutex; }
 
     private: