aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2019-10-09 23:04:11 +0200
committerEelco Dolstra <edolstra@gmail.com>2019-10-09 23:04:11 +0200
commit55bba8e4f51758e6c0556b24743e6946c96f6d92 (patch)
tree0441d57dc4257ddeea7e9af41200eea50349a82c
parent926d3e5bb0ca696ab59352b25d0a818707a28186 (diff)
Make std::uncaught_exception warning less noisy
-rw-r--r--src/libutil/json.cc5
-rw-r--r--src/libutil/json.hh5
2 files changed, 6 insertions, 4 deletions
diff --git a/src/libutil/json.cc b/src/libutil/json.cc
index 0a6fb65f0..74e37b4c4 100644
--- a/src/libutil/json.cc
+++ b/src/libutil/json.cc
@@ -171,4 +171,9 @@ JSONObject JSONPlaceholder::object()
return JSONObject(state);
}
+JSONPlaceholder::~JSONPlaceholder()
+{
+ assert(!first || std::uncaught_exception());
+}
+
}
diff --git a/src/libutil/json.hh b/src/libutil/json.hh
index 02a39917f..83213ca66 100644
--- a/src/libutil/json.hh
+++ b/src/libutil/json.hh
@@ -168,10 +168,7 @@ public:
{
}
- ~JSONPlaceholder()
- {
- assert(!first || std::uncaught_exception());
- }
+ ~JSONPlaceholder();
template<typename T>
void write(const T & v)