Boost logo

Boost :

Subject: Re: [boost] double_ended - request formal review
From: Mathias Gaunard (mathias.gaunard_at_[hidden])
Date: 2016-07-21 10:59:17


On 15 July 2016 at 16:51, Benedek Thaler <thalerbenedek_at_[hidden]> wrote:

> Dear Boost,
>
> I'd like to request the review of the double_ended library.
>
> Code: https://github.com/erenon/double_ended
> Documentation: http://erenon.hu/double_ended
>
> The library contains two classes. Excerpt from the documentation:
>
> * `devector` is a hybrid of the standard vector and deque containers, as
> well as the small_vector of Boost.Container. It offers cheap (amortized
> constant time) insertion at both the front and back ends, while also
> providing the regular features of std::vector, in particular the contiguous
> underlying memory. In contrast to the standard vector, however, devector
> offers greater control over its internals. Like small_vector, it can store
> elements internally without dynamically allocating memory.

Not related to your request per-se, but I think this occasion is as good as
any to discuss the library.

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.


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