From 42547a20d900a6733c85e9e8b12a733146192bab Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Thu, 2 Dec 2021 17:44:52 -0700 Subject: [PATCH] Try to work around an issue with the Xcode compiler. --- include/deal.II/base/thread_management.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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 -- 2.39.5