
On Sun, Sep 14, 2008 at 10:44 AM, JOAQUIN M. LOPEZ MUÑOZ <joaquin@tid.es> wrote:
Hi Emil, ________________________________________ De: boost-bounces@lists.boost.org [boost-bounces@lists.boost.org] En nombre de Emil Dotchevski [emil@revergestudios.com] Enviado el: domingo, 14 de septiembre de 2008 19:35 Para: boost@lists.boost.org Asunto: Re: [boost] request for interest: stable vector
On Sun, Sep 14, 2008 at 9:42 AM, JOAQUIN M. LOPEZ MUÑOZ <joaquin@tid.es> 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