Anyway, the iterator's `< shouldn't compare the data values, it should compare the iterators - "before", not "less".
Well, that could require an element walk through in some cases, e.g. in the new multiset implementation, which would be more expensive. Anyway, if there is an order then "before" should always be the same as "less" so it doesn't matter much.
/ Martin Stjernholm, Roxen IS
Previous text:
2002-11-03 08:00: Subject: Re: Proposal for new ADT interface
Not really. If you have an unordered set you might get two iterators that iterates over all members in different order.
Of course. But with for instance mappings, the iterator uses the same order until the mapping is changed or indexed. (Then the operator can give an error, just like when the operator is used on an iterator over some other data.)
Anyway, the iterator's `< shouldn't compare the data values, it should compare the iterators - "before", not "less".
/ Brevbäraren
pike-devel@lists.lysator.liu.se