From d714c75f2dc9c37d0e9fda1ba63b9896da09f44a Mon Sep 17 00:00:00 2001 From: Matthias Maier Date: Wed, 8 Dec 2021 17:46:41 -0600 Subject: [PATCH] bundled/tbb: avoid a warning when compiling with -std=c++17 --- bundled/tbb-2018_U2/include/tbb/task_group.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bundled/tbb-2018_U2/include/tbb/task_group.h b/bundled/tbb-2018_U2/include/tbb/task_group.h index b30addc829..ad030dbbc8 100644 --- a/bundled/tbb-2018_U2/include/tbb/task_group.h +++ b/bundled/tbb-2018_U2/include/tbb/task_group.h @@ -114,7 +114,12 @@ public: ~task_group_base() __TBB_NOEXCEPT(false) { if( my_root->ref_count() > 1 ) { +# if __cpp_lib_uncaught_exceptions >= 201411 + // std::uncaught_exception() is deprecated in c++17 + bool stack_unwinding_in_progress = (std::uncaught_exceptions() > 0); +# else bool stack_unwinding_in_progress = std::uncaught_exception(); +# endif // Always attempt to do proper cleanup to avoid inevitable memory corruption // in case of missing wait (for the sake of better testability & debuggability) if ( !is_canceling() ) -- 2.39.5