From 973a2ce1edd76957ace20425fc7c9ad7e340ec92 Mon Sep 17 00:00:00 2001 From: Daniel Arndt Date: Wed, 5 Jul 2023 11:33:41 -0400 Subject: [PATCH] Fix some comparisons operator for g++-13 with C++20 --- include/deal.II/base/linear_index_iterator.h | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/include/deal.II/base/linear_index_iterator.h b/include/deal.II/base/linear_index_iterator.h index b3c1b2dcc7..9894774680 100644 --- a/include/deal.II/base/linear_index_iterator.h +++ b/include/deal.II/base/linear_index_iterator.h @@ -254,25 +254,23 @@ public: * the same entry in the same container. */ template - friend std::enable_if_t< - std::is_convertible::value, - bool> - operator==(const LinearIndexIterator &left, const OtherIterator &right) + std::enable_if_t::value, + bool> + operator==(const OtherIterator &right) const { const auto &right_2 = static_cast(right); - return left.accessor == right_2.accessor; + return this->accessor == right_2.accessor; } /** * Opposite of operator==(). */ template - friend std::enable_if_t< - std::is_convertible::value, - bool> - operator!=(const LinearIndexIterator &left, const OtherIterator &right) + std::enable_if_t::value, + bool> + operator!=(const OtherIterator &right) const { - return !(left == right); + return !(*this == right); } /** -- 2.39.5