From: Daniel Arndt Date: Tue, 21 Mar 2023 21:47:24 +0000 (-0400) Subject: Fix MatrixIterator comparison operator for C++20 X-Git-Tag: v9.5.0-rc1~442^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F14937%2Fhead;p=dealii.git Fix MatrixIterator comparison operator for C++20 --- diff --git a/include/deal.II/lac/matrix_iterator.h b/include/deal.II/lac/matrix_iterator.h index 9374c46bee..cc7cfe1834 100644 --- a/include/deal.II/lac/matrix_iterator.h +++ b/include/deal.II/lac/matrix_iterator.h @@ -87,14 +87,16 @@ public: /** * Comparison. True, if both accessors are equal. */ + template bool - operator==(const MatrixIterator &) const; + operator==(const MatrixIterator &) const; /** * Inverse of ==. */ + template bool - operator!=(const MatrixIterator &) const; + operator!=(const MatrixIterator &) const; /** * Comparison operator. Result is true if either the first row number is @@ -178,16 +180,20 @@ MatrixIterator::operator->() const template +template inline bool -MatrixIterator::operator==(const MatrixIterator &other) const +MatrixIterator::operator==( + const MatrixIterator &other) const { return (accessor == other.accessor); } template +template inline bool -MatrixIterator::operator!=(const MatrixIterator &other) const +MatrixIterator::operator!=( + const MatrixIterator &other) const { return !(*this == other); }