From: Daniel Arndt Date: Tue, 26 May 2020 02:24:55 +0000 (-0400) Subject: Fix test X-Git-Tag: v9.3.0-rc1~1558^2~3 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=789599f63d191fd832236ab470a8b3069cd4841f;p=dealii.git Fix test --- diff --git a/include/deal.II/base/linear_index_iterator.h b/include/deal.II/base/linear_index_iterator.h index 663bac355d..c90b430840 100644 --- a/include/deal.II/base/linear_index_iterator.h +++ b/include/deal.II/base/linear_index_iterator.h @@ -249,8 +249,16 @@ public: * Comparison operator. Returns true if both iterators point to * the same entry in the same container. */ - bool - operator==(const LinearIndexIterator &) const; + template + friend typename std::enable_if< + std::is_convertible::value, + bool>::type + operator==(const LinearIndexIterator &left, const OtherIterator &right) + { + const auto &right_2 = static_cast(right); + return left.accessor.container == right_2.accessor.container && + left.accessor.linear_index == right_2.accessor.linear_index; + } /** * Inverse of operator==(). @@ -444,17 +452,6 @@ inline typename LinearIndexIterator::pointer -template -inline bool -LinearIndexIterator::operator==( - const LinearIndexIterator &other) const -{ - return accessor.container == other.accessor.container && - accessor.linear_index == other.accessor.linear_index; -} - - - template inline bool LinearIndexIterator::