Boost logo

Boost :

Subject: Re: [boost] [container][intrusive] Treap for Boost.Container?
From: Vadim Stadnik (vadimstdk_at_[hidden])
Date: 2013-03-18 16:01:09


On Tue, Mar 19, 2013 at 4:06 AM, Phil Endecott <
spam_from_boost_dev_at_[hidden]> wrote:
...

>
> (While I'm here.... does anyone know about a list-like container that has
> lower memory
> overhead when the data type is small, i.e. ints or chars? I was
> considering something
> using chunks like a std::list< std::vector<T> >, but insertion would
> invalidate
> other iterators in the same chunk, which is unacceptable. Any ideas?)
>
>
I think you can replace std::vector<T> for
boost::container::stable_vector<T>

http://www.boost.org/doc/libs/1_53_0/doc/html/boost/container/stable_vector.html

Its advantage over as a singly linked list, for example, is that is
supports random access iterators. However, to solve the problem of iterator
invalidation elements are not stored contiguously in memory chunks.

Regards,
Vadim Stadnik


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