]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Add another comparison operator
authorDaniel Arndt <arndtd@ornl.gov>
Tue, 26 May 2020 12:45:37 +0000 (08:45 -0400)
committerDaniel Arndt <arndtd@ornl.gov>
Tue, 26 May 2020 12:45:37 +0000 (08:45 -0400)
include/deal.II/base/table.h

index 7b4c0fd36481590ee41c96893b1410ed01db2052..2162e88d90ddb6628f187db36a96adabd1e6f0d8 100644 (file)
@@ -907,6 +907,19 @@ namespace MatrixTableIterators
     AccessorBase(const container_pointer_type table,
                  const std::ptrdiff_t         linear_index);
 
+    /**
+     * Comparison operator.
+     */
+    template <bool OtherConstness>
+    friend bool
+    operator==(
+      const AccessorBase<TableType, Constness, storage_order> &     left,
+      const AccessorBase<TableType, OtherConstness, storage_order> &right)
+    {
+      return left.container == right.container &&
+             left.linear_index == right.linear_index;
+    }
+
     /**
      * Get a constant reference to the value of the element represented by
      * this accessor.

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.