From 765707537f02e5c8e7787153841067ea777e8726 Mon Sep 17 00:00:00 2001 From: Daniel Arndt Date: Tue, 21 Mar 2023 17:47:24 -0400 Subject: [PATCH] Fix MatrixIterator comparison operator for C++20 --- include/deal.II/lac/matrix_iterator.h | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) 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); } -- 2.39.5