From 80400b0477598a858173d16c01abfd607a657722 Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Mon, 28 Sep 2015 19:44:40 +0100 Subject: [PATCH] LWG 2135: terminate() in condition_variable::wait() * include/std/condition_variable (condition_variable::wait): Add noexcept. * src/c++11/condition_variable.cc (condition_variable::wait): Call std::terminate on error (DR 2135). From-SVN: r228217 --- libstdc++-v3/ChangeLog | 7 +++++++ libstdc++-v3/include/std/condition_variable | 2 +- libstdc++-v3/src/c++11/condition_variable.cc | 4 ++-- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 50f6e8b694c..6b2738f3aed 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,10 @@ +2015-09-28 Jonathan Wakely + + * include/std/condition_variable (condition_variable::wait): Add + noexcept. + * src/c++11/condition_variable.cc (condition_variable::wait): Call + std::terminate on error (DR 2135). + 2015-09-25 Ville Voutilainen Avoid creating dangling references in case of nested tuples diff --git a/libstdc++-v3/include/std/condition_variable b/libstdc++-v3/include/std/condition_variable index 4714774f1c3..f5f773492ad 100644 --- a/libstdc++-v3/include/std/condition_variable +++ b/libstdc++-v3/include/std/condition_variable @@ -89,7 +89,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION notify_all() noexcept; void - wait(unique_lock& __lock); + wait(unique_lock& __lock) noexcept; template void diff --git a/libstdc++-v3/src/c++11/condition_variable.cc b/libstdc++-v3/src/c++11/condition_variable.cc index cc0f6e4506a..fd850cb5211 100644 --- a/libstdc++-v3/src/c++11/condition_variable.cc +++ b/libstdc++-v3/src/c++11/condition_variable.cc @@ -48,12 +48,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION } void - condition_variable::wait(unique_lock& __lock) + condition_variable::wait(unique_lock& __lock) noexcept { int __e = __gthread_cond_wait(&_M_cond, __lock.mutex()->native_handle()); if (__e) - __throw_system_error(__e); + std::terminate(); } void -- 2.30.2