aboutsummaryrefslogtreecommitdiff
path: root/src/libutil
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2019-09-13 20:05:27 +0200
committerEelco Dolstra <edolstra@gmail.com>2019-09-13 20:05:44 +0200
commit6b83174ffffbdfc3f876d94d5178e0b83f675cae (patch)
tree8833453d07470edd8099d2f556ac5740e15b1239 /src/libutil
parentcf4c31c872ac7fbf9c926a49303c5b8b5ffd02c8 (diff)
std::uncaught_exception() -> std::uncaught_exceptions()
The former is deprecated in C++17. Fixes a clang warning.
Diffstat (limited to 'src/libutil')
-rw-r--r--src/libutil/json.hh2
-rw-r--r--src/libutil/util.cc2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/libutil/json.hh b/src/libutil/json.hh
index 02a39917f..45a22f011 100644
--- a/src/libutil/json.hh
+++ b/src/libutil/json.hh
@@ -170,7 +170,7 @@ public:
~JSONPlaceholder()
{
- assert(!first || std::uncaught_exception());
+ assert(!first || std::uncaught_exceptions());
}
template<typename T>
diff --git a/src/libutil/util.cc b/src/libutil/util.cc
index 1b7449991..e65f8ee56 100644
--- a/src/libutil/util.cc
+++ b/src/libutil/util.cc
@@ -1169,7 +1169,7 @@ void _interrupted()
/* Block user interrupts while an exception is being handled.
Throwing an exception while another exception is being handled
kills the program! */
- if (!interruptThrown && !std::uncaught_exception()) {
+ if (!interruptThrown && !std::uncaught_exceptions()) {
interruptThrown = true;
throw Interrupted("interrupted by the user");
}