]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Explicitly =delete ConstraintMatrix::operator=(). 4645/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Sat, 22 Jul 2017 20:31:09 +0000 (14:31 -0600)
committerWolfgang Bangerth <bangerth@colostate.edu>
Sat, 22 Jul 2017 20:31:32 +0000 (14:31 -0600)
Currently, it was just made 'private' and not implemented.

include/deal.II/lac/constraint_matrix.h

index f720bd510cc351ca34464cabf18bd98e8d83a44b..adb33df06f52ed5bd97d968e817251807c78464a 100644 (file)
@@ -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<LocalType>              &local_vector,
                         const std::vector<size_type>         &local_dof_indices,
                         const FullMatrix<LocalType>          &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);
 };
 
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.