diff --git a/src/bees-trace.cc b/src/bees-trace.cc index bc75678..fdb1925 100644 --- a/src/bees-trace.cc +++ b/src/bees-trace.cc @@ -8,21 +8,15 @@ thread_local BeesTracer *BeesTracer::tl_next_tracer = nullptr; thread_local bool BeesTracer::tl_first = true; thread_local bool BeesTracer::tl_silent = false; +bool +exception_check() +{ #if __cplusplus >= 201703 -static -bool -exception_check() -{ return uncaught_exceptions(); -} #else -static -bool -exception_check() -{ return uncaught_exception(); -} #endif +} BeesTracer::~BeesTracer() { diff --git a/src/bees.h b/src/bees.h index 2cbe466..314cbe8 100644 --- a/src/bees.h +++ b/src/bees.h @@ -901,5 +901,6 @@ void bees_readahead_pair(int fd, off_t offset, size_t size, int fd2, off_t offse void bees_unreadahead(int fd, off_t offset, size_t size); void bees_throttle(double time_used, const char *context); string format_time(time_t t); +bool exception_check(); #endif