Menu

#15 Odd subscript_iterator arithmetic operators

open
None
5
2005-09-03
2005-09-03
No

The arithmetic ops for subscript_iterator are odd, for
example:

bool operator != (const subscript_iterator &j) const
{
return (d == j.d && i!=j.i);
}

this means that two iterators with different 'd'
pointers will return false when compared with !=

I don't plan to change this for 2.0.0 as I need to look
into it further.

Should define < and == correctly and then implement
others in terms of them.

Discussion


Log in to post a comment.