Subject: Re: [boost] double_ended - request formal review
From: Benedek Thaler (thalerbenedek_at_[hidden])
Date: 2016-07-24 09:44:55
On Thu, Jul 21, 2016 at 4:59 PM, Mathias Gaunard <
> On 15 July 2016 at 16:51, Benedek Thaler <thalerbenedek_at_[hidden]> wrote:
> devector is an interesting variant of vector, but it gives the illusion
> that is could be used as a queue.
> However given the implementation, it seems elements removed from either end
> will never be reclaimed.
> I suggest documenting that limitation or having a threshold above which
> memory is actually freed.
Thanks for the feedback, Mathias. You are right. This implementation detail
is a consequence of honoring reserve calls:
The reserve back has to keep the front capacity untouched or it breaks the
promise of it. This also applies to a series of push_front/pop_backs, for
I'll document this behavior. During the review, we'll see if we need more
radical changes, e.g: changing the guarantees of reserve calls.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk