From: Wolfgang Bangerth Date: Mon, 7 Nov 2016 17:33:14 +0000 (-0700) Subject: Provide copy operator and initialize member variables. X-Git-Tag: v8.5.0-rc1~441^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F3494%2Fhead;p=dealii.git Provide copy operator and initialize member variables. --- diff --git a/include/deal.II/base/thread_management.h b/include/deal.II/base/thread_management.h index ae1ece1263..4c61e272b3 100644 --- a/include/deal.II/base/thread_management.h +++ b/include/deal.II/base/thread_management.h @@ -2859,6 +2859,13 @@ namespace Threads */ ~TaskDescriptor (); + /** + * Copy operator. Throws an exception since we want to make sure that + * each TaskDescriptor object corresponds to exactly one task. + */ + TaskDescriptor & + operator = (const TaskDescriptor &); + /** * Queue up the task to the scheduler. We need to do this in a separate * function since the new tasks needs to access objects from the current @@ -2908,6 +2915,8 @@ namespace Threads template TaskDescriptor::TaskDescriptor () + : + task_is_done (false) { Assert (false, ExcInternalError()); } @@ -2916,7 +2925,11 @@ namespace Threads template TaskDescriptor::TaskDescriptor (const TaskDescriptor &) + : + task_is_done (false) { + // we shouldn't be getting here -- task descriptors + // can't be copied Assert (false, ExcInternalError()); } @@ -2945,6 +2958,17 @@ namespace Threads } + template + TaskDescriptor & + TaskDescriptor::operator = (const TaskDescriptor &) + { + // we shouldn't be getting here -- task descriptors + // can't be copied + Assert (false, ExcInternalError()); + return *this; + } + + template inline void