Boost logo

Boost :

From: Jens Maurer (Jens.Maurer_at_[hidden])
Date: 2000-11-14 14:11:40


AlisdairM - BTInternet wrote:
> The most efficient implementation would have a statically sized array, where
> the array size is an integer paramater of the template. A more dynamic
> variation to allow run-time sizing of the array would be better based on
> std::vector, with similar implementation details.

You could leave the decision of a fixed-length or run-time sizeable
array to the user by making the base container a template parameter,
similar to std::stack. This also allows use of std::list as the
base container.

> i/ Is the name 'queue' approriate, as the whole idea is to allow iteration
> of the whole interval, whereas a queue traditionally has a front and a back,
> but no knowledge of what lies between.

I think the name "queue" is too much overloaded.
What about "wrapping_buffer"?

Jens Maurer


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk