24 Jul
2011
24 Jul
'11
4:29 a.m.
What is the traversal type? Random access is _possible_ just not efficient. To move forward n locations it has to increment n times. ++ and −− are fine. There is indeed a well defined distance between two iterators, but I don't want to encourage that kind of thing and hide the inefficiency. But, I see that relational operators are defined for random access (only), not for bidirectional? Why is that? Note that relational operators for the proposed type _are_ efficient, as it can defer to the underlying iterator. I knows which is greater, just not by how much exactly.
Interesting problem! Would it work to make it bidirectional, and then define your own relational operators? Regards, Nate.