From fb02f59631c8310d0e1e3bf5c388828d18145fdd Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Mon, 7 Nov 2016 10:33:14 -0700 Subject: [PATCH] Provide copy operator and initialize member variables. --- include/deal.II/base/thread_management.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) 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 -- 2.39.5