}
/**
- * Inverse of operator==().
+ * Opposite of operator==().
*/
- bool
- operator!=(const DerivedIterator &) const;
+ template <typename OtherIterator>
+ friend typename std::enable_if<
+ std::is_convertible<OtherIterator, DerivedIterator>::value,
+ bool>::type
+ operator!=(const LinearIndexIterator &left, const OtherIterator &right)
+ {
+ return !(left == right);
+ }
/**
* Comparison operator: uses the same ordering as operator<(), but also
-template <class DerivedIterator, class AccessorType>
-inline bool
-LinearIndexIterator<DerivedIterator, AccessorType>::
-operator!=(const DerivedIterator &other) const
-{
- return !(*this == other);
-}
-
-
-
template <class DerivedIterator, class AccessorType>
inline bool
LinearIndexIterator<DerivedIterator, AccessorType>::