From: Wolfgang Bangerth Date: Fri, 3 Dec 2021 00:44:52 +0000 (-0700) Subject: Try to work around an issue with the Xcode compiler. X-Git-Tag: v9.4.0-rc1~762^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F13018%2Fhead;p=dealii.git Try to work around an issue with the Xcode compiler. --- diff --git a/include/deal.II/base/thread_management.h b/include/deal.II/base/thread_management.h index 265768f35d..0772b36e62 100644 --- a/include/deal.II/base/thread_management.h +++ b/include/deal.II/base/thread_management.h @@ -1015,7 +1015,8 @@ namespace Threads // but have to make do with a pointer to such an object. std::unique_ptr> promise = std::make_unique>(); - task_data = std::make_shared(promise->get_future()); + task_data = + std::make_shared(std::move(promise->get_future())); // Then start the task, using a task_group object (for just this one // task) that is associated with the TaskData object. Note that we @@ -1291,7 +1292,7 @@ namespace Threads * Constructor. Initializes an std::future object and assumes * that the task so set has not finished yet. */ - TaskData(std::future &&future) + TaskData(std::future &&future) noexcept : future(std::move(future)) , task_has_finished(false) {} @@ -1329,7 +1330,7 @@ namespace Threads * this makes sure that one cannot just abandon a task completely * by letting all Task objects that point to it go out of scope. */ - ~TaskData() + ~TaskData() noexcept { // Explicitly wait for the results to be ready. This class stores // a std::future object, and we could just let the compiler generate