|
Boost : |
From: Pavel Vozenilek (pavel_vozenilek_at_[hidden])
Date: 2003-07-28 03:46:41
"Nigel Stewart" <nigels_at_[hidden]> wrote in message
news:bg1r2l$8od$1_at_main.gmane.org...
>
> > Wouldn't it be better to use smaller internal memory block initially and
> > resize it only when demand goes up?
>
> That's a good point, but it certainly complicates both the interface
> and the semantics of the container. Could this style of circular
> buffer be an adaptor, or perhaps a policy adaptor?
>
IMO the resize/shrink cannot be added via adaptor (unless it is very complex
one).
It may be possible to design circular_buffer<> as adaptor over [vector |
deque | list | slist | shrinkable vector | ...].
/Pavel
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk