]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Provide special member functions for TriaAccessor
authorDaniel Arndt <arndtd@ornl.gov>
Mon, 24 May 2021 14:34:06 +0000 (10:34 -0400)
committerDaniel Arndt <arndtd@ornl.gov>
Mon, 24 May 2021 21:57:41 +0000 (17:57 -0400)
include/deal.II/grid/tria_accessor.h

index a5a94aaa0da99245eafea5a6def70824fd6ecb53..a2d7c2a7000cc9c8e8fa7e93ae44c4694c4151aa 100644 (file)
@@ -720,6 +720,16 @@ public:
                const int                           index      = -1,
                const AccessorData *                local_data = nullptr);
 
+  /**
+   * Similar to the copy assignment operator the copy constructor is deleted.
+   */
+  TriaAccessor(const TriaAccessor &) = delete;
+
+  /**
+   * Move construction is still allowed.
+   */
+  TriaAccessor(TriaAccessor &&) = default;
+
   /**
    * Conversion constructor. This constructor exists to make certain
    * constructs simpler to write in dimension independent code. For example,
@@ -754,6 +764,17 @@ public:
   void
   operator=(const TriaAccessor &) = delete;
 
+  /**
+   * Move assignemt operator. Moving is allowed.
+   */
+  void
+  operator=(TriaAccessor &&) = default;
+
+  /**
+   * Defaulted destructor.
+   */
+  ~TriaAcessor() = default;
+
   /**
    * Test for the element being used or not.  The return value is @p true for
    * all iterators that are either normal iterators or active iterators, only

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.