]> https://gitweb.dealii.org/ - dealii.git/commitdiff
gcc9 warning: Provide copy constructor for class with operator=
authorMartin Kronbichler <kronbichler@lnm.mw.tum.de>
Mon, 13 May 2019 13:50:40 +0000 (15:50 +0200)
committerMartin Kronbichler <kronbichler@lnm.mw.tum.de>
Mon, 13 May 2019 16:04:20 +0000 (18:04 +0200)
include/deal.II/lac/petsc_vector.h
source/lac/petsc_parallel_vector.cc

index 1c43760ac15967952c16831c053f4e3dd2e54812..ab08a6ba69db798e3399a582357b776ad9c8dced 100644 (file)
@@ -262,6 +262,11 @@ namespace PETScWrappers
        */
       explicit Vector(const IndexSet &local, const MPI_Comm &communicator);
 
+      /**
+       * Copy constructor.
+       */
+      Vector(const Vector &v);
+
       /**
        * Release all memory and return to a state just like after having
        * called the default constructor.
index f0a12353b2808c394f1756cbce90d8fb7a8d9c2b..da90e9ab772397b75f5529fbc636b7ae327af69d 100644 (file)
@@ -85,6 +85,14 @@ namespace PETScWrappers
 
 
 
+    Vector::Vector(const Vector &v)
+      : VectorBase()
+    {
+      this->operator=(v);
+    }
+
+
+
     Vector::Vector(const IndexSet &local, const MPI_Comm &communicator)
       : communicator(communicator)
     {

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.