From: Wolfgang Bangerth Date: Thu, 2 Dec 2021 22:16:05 +0000 (-0700) Subject: Explicitly disallow copying or moving TaskData objects. X-Git-Tag: v9.4.0-rc1~762^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a4b3ee3f71b95590ed14805742ba91dcc71bfa71;p=dealii.git Explicitly disallow copying or moving TaskData objects. --- diff --git a/include/deal.II/base/thread_management.h b/include/deal.II/base/thread_management.h index e5bcc12e0a..265768f35d 100644 --- a/include/deal.II/base/thread_management.h +++ b/include/deal.II/base/thread_management.h @@ -1296,6 +1296,31 @@ namespace Threads , task_has_finished(false) {} + /** + * There can only be one TaskData object referencing + * a task. Make sure that these objects are not copied. + */ + TaskData(const TaskData &) = delete; + + /** + * There can only be one TaskData object referencing + * a task. Make sure that these objects are not moved. + */ + TaskData(TaskData &&) = delete; + + /** + * There can only be one TaskData object referencing + * a task. Make sure that these objects are not copied. + */ + TaskData & + operator=(const TaskData &) = delete; + + /** + * There can only be one TaskData object referencing + * a task. Make sure that these objects are not moved. + */ + TaskData & + operator=(TaskData &&) = delete; /** * Destructor. Wait for the results to be ready. This ensures that the