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.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@216384 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
4de32048f5
commit
861f1e95fd
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user