diff options
Diffstat (limited to 'contrib/libc++/include/__mutex_base')
-rw-r--r-- | contrib/libc++/include/__mutex_base | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/contrib/libc++/include/__mutex_base b/contrib/libc++/include/__mutex_base index 159acd626618..3b2453f1ba1a 100644 --- a/contrib/libc++/include/__mutex_base +++ b/contrib/libc++/include/__mutex_base @@ -48,7 +48,7 @@ class _LIBCPP_TYPE_VIS _LIBCPP_THREAD_SAFETY_ANNOTATION(capability("mutex")) mut public: _LIBCPP_INLINE_VISIBILITY #ifndef _LIBCPP_CXX03_LANG - constexpr mutex() _NOEXCEPT = default; + constexpr mutex() = default; #else mutex() _NOEXCEPT {__m_ = (__libcpp_mutex_t)_LIBCPP_MUTEX_INITIALIZER;} #endif @@ -67,6 +67,9 @@ public: _LIBCPP_INLINE_VISIBILITY native_handle_type native_handle() {return &__m_;} }; +static_assert(is_nothrow_default_constructible<mutex>::value, + "the default constructor for std::mutex must be nothrow"); + struct _LIBCPP_TYPE_VIS defer_lock_t {}; struct _LIBCPP_TYPE_VIS try_to_lock_t {}; struct _LIBCPP_TYPE_VIS adopt_lock_t {}; |