From dbd6bd21b6d55ebab58a2d1e30b817583d70488b Mon Sep 17 00:00:00 2001 From: Benjamin Buchfink Date: Mon, 27 Feb 2023 12:00:40 +0100 Subject: [PATCH] Check for c++17 --- src/util/log_stream.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/util/log_stream.h b/src/util/log_stream.h index f89234b4..3dd59bd5 100644 --- a/src/util/log_stream.h +++ b/src/util/log_stream.h @@ -79,7 +79,11 @@ struct task_timer {} ~task_timer() { +#if __cplusplus >= 201703L if (!std::uncaught_exceptions()) +#else + if (!std::uncaught_exception()) +#endif finish(); } void go(const char* msg = nullptr)