[boost] Re: circular_buffer and unused space overhead

2003-07-31 Thread Nigel Stewart
From practical point of view, adding auto-resize to circular_buffer is easier than creating new container. Well from a code comprehension view, is it helpful that a particular container may or may not be in a auto-resizing mode? We could well built a container that

[boost] Re: circular_buffer and unused space overhead

2003-07-29 Thread Nigel Stewart
My feeling is that with optional auto-resize feature circular_buffer may hit the sweet spot of being good enough for 80% apps. The auto-resize would kick in only when user explicitly asked for it. I suppose my resistance to that is partly aestetic. Having a container that is

[boost] Re: circular_buffer and unused space overhead

2003-07-29 Thread Pavel Vozenilek
In relation to the previous discussion I thought an alternative container may be a circular_deque that could have the kind of flexibility with resizing that also sounds desirable. Does a circular_deque sound like the right solution to your particular application, rather than a vector-like

[boost] Re: circular_buffer and unused space overhead

2003-07-28 Thread Pavel Vozenilek
Nigel Stewart [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] 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.

[boost] Re: circular_buffer and unused space overhead

2003-07-28 Thread Nigel Stewart
IMO the resize/shrink cannot be added via adaptor (unless it is very complex one). An adaptor that wraps push() and insert() would be considerd too heavy-weight? It may be possible to design circular_buffer as adaptor over [vector | deque | list | slist | shrinkable

[boost] Re: circular_buffer and unused space overhead

2003-07-28 Thread Pavel Vozenilek
Nigel Stewart [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] IMO the resize/shrink cannot be added via adaptor (unless it is very complex one). An adaptor that wraps push() and insert() would be considerd too heavy-weight? I think it is pretty heavyweight, but maybe there's

[boost] Re: circular_buffer and unused space overhead

2003-07-27 Thread Nigel Stewart
Wouldn't it be better to use smaller internal memory block initially and resize it only when demand goes up? Pavel, 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