From: Matthias Maier Date: Wed, 8 Dec 2021 23:46:41 +0000 (-0600) Subject: bundled/tbb: avoid a warning when compiling with -std=c++17 X-Git-Tag: v9.4.0-rc1~758^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F13050%2Fhead;p=dealii.git bundled/tbb: avoid a warning when compiling with -std=c++17 --- 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() )