Boost logo

Boost Users :

Subject: Re: [Boost-users] [Containers] Marshalling deques
From: Gottlob Frege (gottlobfrege_at_[hidden])
Date: 2011-08-25 00:15:43


On Wed, Aug 24, 2011 at 2:06 PM, Brian Wood <woodbrian77_at_[hidden]> wrote:
>
> If I could get the number of elements in the first chunk and the
> size of the chunks, that would be sufficient.  (I believe the size
> of the chunks is constant within a deque instance.)

If you have pushed on the front/back then the first/last chunk won't
be of the same size.
(Or rather, the memory for the chunk will *probably* be the same size,
but the chunk may have empty/invalid entries.)

> I find it disappointing that the latest version of the standard doesn't
> have anything related to this and would rather just get something
> working than figuring out what would be a flexible, general interface.
>

I'd guess something like a "chunk iterator" that returns (on
dereference) a range-like object describing the current chunk.

Tony


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net