[libcxx] r216384 - Replace 'noexcept' with '_NOEXCEPT' in <shared_mutex>. This allows us to build the dylib with MSVC, which doesn't support noexcept (sheesh\!). Thanks to K-ballo for the report.

Marshall Clow mclow.lists at gmail.com
Mon Aug 25 07:53:16 PDT 2014


Author: marshall
Date: Mon Aug 25 09:53:16 2014
New Revision: 216384

URL: http://llvm.org/viewvc/llvm-project?rev=216384&view=rev
Log:
Replace 'noexcept' with '_NOEXCEPT' in <shared_mutex>. This allows us to build the dylib with MSVC, which doesn't support noexcept (sheesh\!). Thanks to K-ballo for the report.

Modified:
    libcxx/trunk/include/shared_mutex

Modified: libcxx/trunk/include/shared_mutex
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/shared_mutex?rev=216384&r1=216383&r2=216384&view=diff
==============================================================================
--- libcxx/trunk/include/shared_mutex (original)
+++ libcxx/trunk/include/shared_mutex Mon Aug 25 09:53:16 2014
@@ -232,7 +232,7 @@ private:
 
 public:
     _LIBCPP_INLINE_VISIBILITY
-    shared_lock() noexcept
+    shared_lock() _NOEXCEPT
         : __m_(nullptr),
           __owns_(false)
         {}
@@ -244,7 +244,7 @@ public:
         {__m_->lock_shared();}
 
     _LIBCPP_INLINE_VISIBILITY
-    shared_lock(mutex_type& __m, defer_lock_t) noexcept
+    shared_lock(mutex_type& __m, defer_lock_t) _NOEXCEPT
         : __m_(&__m),
           __owns_(false)
         {}
@@ -288,7 +288,7 @@ public:
     shared_lock& operator=(shared_lock const&) = delete;
 
     _LIBCPP_INLINE_VISIBILITY
-    shared_lock(shared_lock&& __u) noexcept
+    shared_lock(shared_lock&& __u) _NOEXCEPT
         : __m_(__u.__m_),
           __owns_(__u.__owns_)
         {
@@ -297,7 +297,7 @@ public:
         }
 
     _LIBCPP_INLINE_VISIBILITY
-    shared_lock& operator=(shared_lock&& __u) noexcept
+    shared_lock& operator=(shared_lock&& __u) _NOEXCEPT
     {
         if (__owns_)
             __m_->unlock_shared();
@@ -320,14 +320,14 @@ public:
 
     // Setters
     _LIBCPP_INLINE_VISIBILITY
-    void swap(shared_lock& __u) noexcept
+    void swap(shared_lock& __u) _NOEXCEPT
     {
         _VSTD::swap(__m_, __u.__m_);
         _VSTD::swap(__owns_, __u.__owns_);
     }
 
     _LIBCPP_INLINE_VISIBILITY
-    mutex_type* release() noexcept
+    mutex_type* release() _NOEXCEPT
     {
         mutex_type* __m = __m_;
         __m_ = nullptr;
@@ -337,13 +337,13 @@ public:
 
     // Getters
     _LIBCPP_INLINE_VISIBILITY
-    bool owns_lock() const noexcept {return __owns_;}
+    bool owns_lock() const _NOEXCEPT {return __owns_;}
 
     _LIBCPP_INLINE_VISIBILITY
-    explicit operator bool () const noexcept {return __owns_;}
+    explicit operator bool () const _NOEXCEPT {return __owns_;}
 
     _LIBCPP_INLINE_VISIBILITY
-    mutex_type* mutex() const noexcept {return __m_;}
+    mutex_type* mutex() const _NOEXCEPT {return __m_;}
 };
 
 template <class _Mutex>
@@ -409,7 +409,7 @@ shared_lock<_Mutex>::unlock()
 template <class _Mutex>
 inline _LIBCPP_INLINE_VISIBILITY
 void
-swap(shared_lock<_Mutex>& __x, shared_lock<_Mutex>& __y) noexcept
+swap(shared_lock<_Mutex>& __x, shared_lock<_Mutex>& __y) _NOEXCEPT
     {__x.swap(__y);}
 
 _LIBCPP_END_NAMESPACE_STD





More information about the cfe-commits mailing list