From: Wolfgang Bangerth Date: Sat, 22 Jul 2017 20:31:09 +0000 (-0600) Subject: Explicitly =delete ConstraintMatrix::operator=(). X-Git-Tag: v9.0.0-rc1~1388^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F4645%2Fhead;p=dealii.git Explicitly =delete ConstraintMatrix::operator=(). Currently, it was just made 'private' and not implemented. --- 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); };