This is the mail archive of the mailing list for the libstdc++ project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch] libstdc++/67726 LWG 2135: terminate() in condition_variable::wait()

This was a change between C++11 and C++14.

Tested powerpc64le-linux, committed to trunk.

commit 023e16117005d8ca7dbb0e2e61059b59d7cc0e40
Author: Jonathan Wakely <>
Date:   Mon Sep 28 17:47:35 2015 +0100

    LWG 2135: terminate() in condition_variable::wait()
    	* include/std/condition_variable (condition_variable::wait): Add
    	* src/c++11/ (condition_variable::wait): Call
    	std::terminate on error (DR 2135).

diff --git a/libstdc++-v3/include/std/condition_variable b/libstdc++-v3/include/std/condition_variable
index 4714774..f5f7734 100644
--- a/libstdc++-v3/include/std/condition_variable
+++ b/libstdc++-v3/include/std/condition_variable
     notify_all() noexcept;
-    wait(unique_lock<mutex>& __lock);
+    wait(unique_lock<mutex>& __lock) noexcept;
     template<typename _Predicate>
diff --git a/libstdc++-v3/src/c++11/ b/libstdc++-v3/src/c++11/
index cc0f6e4..fd850cb 100644
--- a/libstdc++-v3/src/c++11/
+++ b/libstdc++-v3/src/c++11/
-  condition_variable::wait(unique_lock<mutex>& __lock)
+  condition_variable::wait(unique_lock<mutex>& __lock) noexcept
     int __e = __gthread_cond_wait(&_M_cond, __lock.mutex()->native_handle());
     if (__e)
-      __throw_system_error(__e);
+      std::terminate();

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]