From: Daniel Arndt Date: Wed, 5 Jul 2023 15:33:41 +0000 (-0400) Subject: Fix some comparisons operator for g++-13 with C++20 X-Git-Tag: relicensing~738^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=973a2ce1edd76957ace20425fc7c9ad7e340ec92;p=dealii.git Fix some comparisons operator for g++-13 with C++20 --- 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); } /**