This operator was formerly implicitly defined, which provides, almost surely,
the wrong behavior since the underlying Vec will then be destroyed twice.
Since both inheriting classes (Vector and MPI::Vector) define their own
operator= overloads this operator is also not necessary.
--- /dev/null
+Changed: PETScWrappers::VectorBase::operator= is now both private and
+undefined. This operator was formerly implicitly defined (i.e., it did a
+byte-for-byte copy of VectorBase's members), which provided, almost certainly,
+the wrong behavior since the underlying <code>Vec</code> (the managed PETSc
+object) would then be destroyed twice. Since both inheriting classes
+(PETScWrappers::Vector and PETScWrappers::MPI::Vector) define their own
+operator= overloads this operator is also not necessary.
+
+<br>
+(David Wells, 2017/02/11)
const PetscScalar *values,
const bool add_values);
-
+ private:
+ /**
+ * Assignment operator. This is currently not implemented, so it is
+ * deliberately left as private (and undefined) to prevent accidental
+ * usage.
+ */
+ VectorBase &operator=(const VectorBase &);
};
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