From: David Wells Date: Thu, 18 Jul 2024 13:31:11 +0000 (-0400) Subject: hp::Collection::CollectionIterator: add some more comparisons. X-Git-Tag: v9.6.0-rc1~77^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F17290%2Fhead;p=dealii.git hp::Collection::CollectionIterator: add some more comparisons. These are required by _GLIBCXX_DEBUG. --- diff --git a/include/deal.II/hp/collection.h b/include/deal.II/hp/collection.h index 22781fea13..d9ed5521c5 100644 --- a/include/deal.II/hp/collection.h +++ b/include/deal.II/hp/collection.h @@ -88,6 +88,46 @@ namespace hp return this->index != other.index; } + /** + * Compare indices. + */ + bool + operator<(const CollectionIterator &other) const + { + Assert(this->data == other.data, ExcDifferentCollection()); + return this->index < other.index; + } + + /** + * Compare indices. + */ + bool + operator<=(const CollectionIterator &other) const + { + Assert(this->data == other.data, ExcDifferentCollection()); + return this->index <= other.index; + } + + /** + * Compare indices. + */ + bool + operator>(const CollectionIterator &other) const + { + Assert(this->data == other.data, ExcDifferentCollection()); + return this->index > other.index; + } + + /** + * Compare indices. + */ + bool + operator>=(const CollectionIterator &other) const + { + Assert(this->data == other.data, ExcDifferentCollection()); + return this->index >= other.index; + } + /** * Dereferencing operator: returns the value of the current index. */