summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libadhocutil/resourcePool.impl.h2
-rw-r--r--libadhocutil/scopeExit.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/libadhocutil/resourcePool.impl.h b/libadhocutil/resourcePool.impl.h
index 7dce653..49f91a5 100644
--- a/libadhocutil/resourcePool.impl.h
+++ b/libadhocutil/resourcePool.impl.h
@@ -88,7 +88,7 @@ namespace AdHoc {
// InUse has one, we don't count that
if (resource.use_count() == 2) {
if (auto pool = std::get<1>(*resource)) {
- if (std::uncaught_exception()) {
+ if (std::uncaught_exceptions()) {
pool->discard(std::get<0>(*resource));
}
else {
diff --git a/libadhocutil/scopeExit.cpp b/libadhocutil/scopeExit.cpp
index a93f8b6..a108fae 100644
--- a/libadhocutil/scopeExit.cpp
+++ b/libadhocutil/scopeExit.cpp
@@ -17,7 +17,7 @@ ScopeExit::ScopeExit(const Event & onexitpre, const Event & onsuccess, const Eve
ScopeExit::~ScopeExit()
{
for(const auto & e : onExitPre) e();
- if (std::uncaught_exception()) {
+ if (std::uncaught_exceptions()) {
for(const auto & e : onFailure) e();
}
else {