Boost logo

Boost :

Subject: Re: [boost] [GSOC] Regarding the project Boost.DeVector
From: Eugene Wee (crystalrecursion_at_[hidden])
Date: 2009-03-22 09:47:07

Hi Satyam,

1. Does the standard specify any sort of implementation for deque, or
> does it only specify the requirements and interface? I ask this
> because if we assume a dynamic array implementation which grows on
> both the sides, implementing 'reserve', and specifying the size of the
> chunk should be a trivial task.

No, the standard only specifies requirements and interfaces, and I do not
think you will be able to extend std::deque to implement the desired
functionality using free function templates alone.

My impression is that this project involves some re-design of the interface,
though it should respect the standard container and sequence container
requirements, and presumably should be as close as feasible to the interface
of std::deque and std::vector (part of the "bringing the best of them both
together" thing). You probably do not need to "assume a dynamic array
implementation which grows on both the sides" since you are going to
implement the container, thus you can choose whatever implementation you
want so long as you can appropriately specify the interface and

Eugene Wee

P.S.: I have never tried implementing a deque myself, but I recall Josuttis
saying that a deque is typically implemented as a list of blocks with the
first and last blocks growing in opposite directions.

Boost list run by bdawes at, gregod at, cpdaniel at, john at