Boost logo

Boost :

Subject: Re: [boost] request for interest: stable vector
From: Emil Dotchevski (emil_at_[hidden])
Date: 2008-09-14 18:10:31


On Sun, Sep 14, 2008 at 10:44 AM, JOAQUIN M. LOPEZ MUÑOZ <joaquin_at_[hidden]> wrote:
> Hi Emil,
> ________________________________________
> De: boost-bounces_at_[hidden] [boost-bounces_at_[hidden]] En nombre de Emil Dotchevski [emil_at_[hidden]]
> Enviado el: domingo, 14 de septiembre de 2008 19:35
> Para: boost_at_[hidden]
> Asunto: Re: [boost] request for interest: stable vector
>
> On Sun, Sep 14, 2008 at 9:42 AM, JOAQUIN M. LOPEZ MUÑOZ <joaquin_at_[hidden]> wrote:
>> I recently wrote up the implementation of a *stable* vector,
>> a container mimicking the interface of std::vector except that
>> it provides iterator and reference stability at the expense of
>> losing memory contiguity:
>>
>> http://bannalia.blogspot.com/2008/09/introducing-stablevector.html
>
> Could you compare the space requirements and complexity of operations
> of your stable_vector and std::deque (which has stable references as
> well)?
>
> std::deque has no stable references in general; 23.2.2.3/19 (on std::deque
> insertion operations) says:
>
> Effects: An insertion in the middle of the deque invalidates all the iterators
> and references to elements of the deque. An insertion at either end of the
> deque invalidates all the iterators to the deque, but has no effect on the
> validity of references to elements of the deque.

Sure, I meant stable references when you insert or erase at either
end. This is plenty good for many use cases that need stable
references.

I'm still interested in the comparison though. :)

Emil Dotchevski
Reverge Studios, Inc.
http://www.revergestudios.com/reblog/index.php?n=ReCode


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