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)