]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Use a virtual destructor with virtual methods. 10879/head
authorDavid Wells <drwells@email.unc.edu>
Wed, 2 Sep 2020 17:16:29 +0000 (13:16 -0400)
committerDavid Wells <drwells@email.unc.edu>
Wed, 2 Sep 2020 18:18:14 +0000 (14:18 -0400)
include/deal.II/base/memory_space.h

index 8a475d320c234d5da80da374761b67355d7ced89..56c60844984cd30fe39ebb2b6e5bc86e5d598236 100644 (file)
@@ -117,6 +117,13 @@ namespace MemorySpace
       : values(nullptr, &std::free)
     {}
 
+    virtual ~MemorySpaceData() = default;
+
+    MemorySpaceData(MemorySpaceData &&) noexcept = default;
+
+    MemorySpaceData &
+    operator=(MemorySpaceData &&) noexcept = default;
+
     virtual void
     copy_to(Number *begin, std::size_t n_elements)
     {
@@ -157,6 +164,13 @@ namespace MemorySpace
       , values_dev(nullptr, Utilities::CUDA::delete_device_data<Number>)
     {}
 
+    virtual ~MemorySpaceData() = default;
+
+    MemorySpaceData(MemorySpaceData &&) noexcept = default;
+
+    MemorySpaceData &
+    operator=(MemorySpaceData &&) noexcept = default;
+
     virtual void
     copy_to(Number *begin, std::size_t n_elements)
     {

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.