Abdelrazak Younes <[EMAIL PROTECTED]> writes: > > Good idea, specially because what we have now is: "slow iteration as a list, > > slow insertion as a vector" > > Not really, what we have now is "fast iteration as a vector, fast
Why? RandomAccessList::iterator is a std::list::iterator... > insertion as a list"... We have O(n) insertions/deletions like std::vector, std::list speed is O(1) > The only drawback of the list based solution is that there is a little > memory overhead. This is of course not a problem. > The advantage is of course that the problem below is > easily solved: > > > The only problem could be if we assume list-type iterator stability on > > insertion. Not many cases (if any) I presume, but hard to catch. What do you mean, that we need the stability or that it is hard to find where we use it? A/