[libcxx-commits] [libcxx] r359229 - Fix buildbot failures after r359159.

Richard Smith via libcxx-commits libcxx-commits at lists.llvm.org
Thu Apr 25 13:00:07 PDT 2019


Author: rsmith
Date: Thu Apr 25 13:00:06 2019
New Revision: 359229

URL: http://llvm.org/viewvc/llvm-project?rev=359229&view=rev
Log:
Fix buildbot failures after r359159.

std::mutex was not actually is_nothrow_default_constructible in C++98/C++03,
because the variable declaration

  std::mutex M;

... could throw an exception from the mutex destructor. Fix it by marking the
destructor as non-throwing. This has no effect in C++11 onwards, because
destructors are non-throwing by default in those language modes.

Modified:
    libcxx/trunk/include/__mutex_base

Modified: libcxx/trunk/include/__mutex_base
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/__mutex_base?rev=359229&r1=359228&r2=359229&view=diff
==============================================================================
--- libcxx/trunk/include/__mutex_base (original)
+++ libcxx/trunk/include/__mutex_base Thu Apr 25 13:00:06 2019
@@ -51,7 +51,7 @@ public:
 #else
     mutex() _NOEXCEPT {__m_ = (__libcpp_mutex_t)_LIBCPP_MUTEX_INITIALIZER;}
 #endif
-    ~mutex();
+    ~mutex() _NOEXCEPT;
 
 private:
     mutex(const mutex&);// = delete;




More information about the libcxx-commits mailing list