]> https://gitweb.dealii.org/ - dealii.git/commitdiff
bundled/tbb: avoid a warning when compiling with -std=c++17 13050/head
authorMatthias Maier <tamiko@43-1.org>
Wed, 8 Dec 2021 23:46:41 +0000 (17:46 -0600)
committerMatthias Maier <tamiko@43-1.org>
Wed, 8 Dec 2021 23:46:41 +0000 (17:46 -0600)
bundled/tbb-2018_U2/include/tbb/task_group.h

index b30addc82996b664c5bb0246656aae517b975bb2..ad030dbbc807624f5ca2b8130cea14e2eb70bbb5 100644 (file)
@@ -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() )

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.