On Thursday, June 12, 2003, at 12:43 PM, Nigel Stewart wrote:
I can see the appeal here in using a circular buffer in
this manner, while at the same time I'm cooling against
the compromise of insert auto-resizes, while push doesn't
which seems inconsistant. Given
Hi all Cyclics!
I want to summarize what we have till now. What should be changed in the proposed
cyclic_buffer.
- Rename to circular_buffer.
- Add push_front() and pop_front().
- resize() to behave similarly to vector::resize().
- change_capacity() becomes again change_capacity(). I think
| -Original Message-
| From: [EMAIL PROTECTED]
| [mailto:[EMAIL PROTECTED] Behalf Of Nigel Stewart
| Sent: Wednesday, June 11, 2003 2:03 AM
| To: [EMAIL PROTECTED]
| Subject: [boost] Re: Review Request: cyclic_buffer
|
| The generally accepted concept of a circular buffer
| is
On Wednesday, June 11, 2003, at 05:55 PM, Dave Gomboc wrote:
Why is
a deque inadequate?
deque is more expensive than a resizing circular buffer in both
performance and code size. One also can not control *when* deque will
allocate as one can with a resizing circular buffer. In a nutshell, a
Hi Howard!
I like your idea. But (referring to the Nigel Stewart's posting) what would you
propose for the insert? Should I not provide it?
Jan
Howard Hinnant wrote:
In article [EMAIL PROTECTED], Alisdair Meredith
[EMAIL PROTECTED] wrote:
| The one true circular buffer template is a nigh
For the general container I propose that insert reallocates if size()
would exceed capacity (invalidating all iterators, pointers and
references). And if size() does not exceed capacity, all iterators,
pointers and references are still invalidated, unless the insert
happens at one end or the
On Tuesday, June 10, 2003, at 10:48 AM, Jan Gaspar wrote:
insert in general should have the basic exception safety guarantee.
But when inserting only one element at either end, the strong
guarantee
is in place.
I think the strong guarantee can reached only in case the
cyclic_buffer is not
full
On Tuesday, June 10, 2003, at 11:33 AM, Nigel Stewart wrote:
Constant time push/pop_front, constant time push/pop_back. When begin
and end collide, reallocation automatically happens vector-like.
Another point to consider:
Constant time push/pop can not be combined with std::vector
Hi Nigel!
Quoting Nigel Stewart [EMAIL PROTECTED]:
Jan,
I'm looking forward to the opportunity of having a close look
at your cyclic_buffer. But for now, a few perhaps shallow
comments...
1.How about push_front()? (in std::list style)
And pop_front()?
For the sake of