Boost logo

Boost :

From: Jeremy Siek (jsiek_at_[hidden])
Date: 2001-07-12 07:56:55


In this other approach, the iterators of the stable_vector would really be
the linked list iterators, and the vector would only be used to get random
access. Actually... now that I think about it, that would give you random
access with stable_vector::operator[], but not
stable_vector::iterator::operator[], yuk. I think acheiving iterator
stability in this case may not be worth while.

On Wed, 11 Jul 2001, David Abrahams wrote:

> Maybe you're talking about something different from what I understand, but I
> don't see how that could provide iterator stability either. If you insert
> something in the vector, iterators to following elements would have to
> remain valid and reference the same elements as before the insertion.
>
> -Dave
>
> ----- Original Message -----
> From: "Jeremy Siek" <jsiek_at_[hidden]>
> To: <boost_at_[hidden]>
> Sent: Wednesday, July 11, 2001 2:57 PM
> Subject: Re: [boost] challenge: stable_vector
>
>
> >
> > Yes, iterator stability would be problematic.
> >
> > The implementation approach suggested by Peter (using a linked list to
> > store the elements, and then store iterators into the linked list from a
> > vector) would provide iterator stability, however, this would be more
> > costly in terms of space and traversal speed than the approach I
> > suggested.
> >

----------------------------------------------------------------------
 Jeremy Siek www: http://www.lsc.nd.edu/~jsiek/
 Ph.D. Candidate, IU B'ton email: jsiek_at_[hidden]
 Summer Manager, AT&T Research phone: (973) 360-8185
----------------------------------------------------------------------


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk