From 1ce2a4992a29d143fc3a126b1afdf9d439f082b9 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Sat, 22 Jul 2017 14:31:09 -0600 Subject: [PATCH] Explicitly =delete ConstraintMatrix::operator=(). Currently, it was just made 'private' and not implemented. --- include/deal.II/lac/constraint_matrix.h | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/include/deal.II/lac/constraint_matrix.h b/include/deal.II/lac/constraint_matrix.h index f720bd510c..adb33df06f 100644 --- a/include/deal.II/lac/constraint_matrix.h +++ b/include/deal.II/lac/constraint_matrix.h @@ -197,6 +197,17 @@ public: */ ConstraintMatrix (ConstraintMatrix &&constraint_matrix) = default; + /** + * Copy operator. Like for many other large objects, this operator + * is deleted to avoid its inadvertent use in places such as + * accidentally declaring a @p ConstraintMatrix object as a + * function argument by value, rather than by reference. + * + * However, you can use the copy_from() function to explicitly + * copy ConstraintMatrix objects. + */ + ConstraintMatrix &operator= (const ConstraintMatrix &) = delete; + /** * Move assignment operator */ @@ -1431,12 +1442,6 @@ private: const Vector &local_vector, const std::vector &local_dof_indices, const FullMatrix &local_matrix) const; - - /** - * The assignment operator is not implemented for performance reasons. You - * can clear() or reinit() and merge() manually if needed. - */ - ConstraintMatrix &operator= (const ConstraintMatrix &other); }; -- 2.39.5