]> https://gitweb.dealii.org/ - dealii.git/commitdiff
hp::Collection::CollectionIterator: add some more comparisons. 17290/head
authorDavid Wells <drwells@email.unc.edu>
Thu, 18 Jul 2024 13:31:11 +0000 (09:31 -0400)
committerDavid Wells <drwells@email.unc.edu>
Thu, 18 Jul 2024 13:31:41 +0000 (09:31 -0400)
These are required by _GLIBCXX_DEBUG.

include/deal.II/hp/collection.h

index 22781fea136b8ae872d439ab36c3c49e9a28a29e..d9ed5521c5b8b37971d2f4ba47377ead09e23c74 100644 (file)
@@ -88,6 +88,46 @@ namespace hp
       return this->index != other.index;
     }
 
+    /**
+     * Compare indices.
+     */
+    bool
+    operator<(const CollectionIterator<T> &other) const
+    {
+      Assert(this->data == other.data, ExcDifferentCollection());
+      return this->index < other.index;
+    }
+
+    /**
+     * Compare indices.
+     */
+    bool
+    operator<=(const CollectionIterator<T> &other) const
+    {
+      Assert(this->data == other.data, ExcDifferentCollection());
+      return this->index <= other.index;
+    }
+
+    /**
+     * Compare indices.
+     */
+    bool
+    operator>(const CollectionIterator<T> &other) const
+    {
+      Assert(this->data == other.data, ExcDifferentCollection());
+      return this->index > other.index;
+    }
+
+    /**
+     * Compare indices.
+     */
+    bool
+    operator>=(const CollectionIterator<T> &other) const
+    {
+      Assert(this->data == other.data, ExcDifferentCollection());
+      return this->index >= other.index;
+    }
+
     /**
      * Dereferencing operator: returns the value of the current index.
      */

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.