]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Add a move constructor for VectorMemory::Pointer.
authorDavid Wells <wellsd2@rpi.edu>
Fri, 15 Dec 2017 16:37:26 +0000 (11:37 -0500)
committerDavid Wells <wellsd2@rpi.edu>
Fri, 15 Dec 2017 16:37:26 +0000 (11:37 -0500)
This lets us write things like

std::vector<typename VectorMemory<VectorType>::Pointer> vec;

include/deal.II/lac/vector_memory.h

index 626fa82faf90fa9b4cacc48c66f7d31f56919f9b..1afe9e3564d2694811e49b811ecec853ad32469e 100644 (file)
@@ -196,6 +196,12 @@ public:
      */
     Pointer() = default;
 
+    /**
+     * Move constructor. This operator steals the pointer to the vector
+     * represented by this object from the one give as argument.
+     */
+    Pointer(Pointer &&) = default;
+
     /**
      * Move operator. This operator steals the pointer to the vector
      * represented by this object from the one give as argument.

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.