-----Original Message----- From: Boost
On Behalf Of Andrey Semashev via Boost Sent: 21 May 2020 23:18 To: boost@lists.boost.org List Cc: Andrey Semashev Subject: [boost] [container] Proposal for ring queues Hi,
Some time ago I have proposed to include ring_queue and small_ring_queue containers to Boost.Container:
https://github.com/boostorg/container/pull/121
The ring queues work similarly to std::queue with the main difference being that they use a ring buffer internally to store elements. The small_ring_queue also allows to allocate a static storage for a fixed amount of elements. The benefit of this is that dynamic memory allocations can be practically avoided when the number of enqueued elements does not exceed some limit.
In his reply in that PR Ion was not very enthusiastic about including these containers into Boost.Container mostly because (a) there was presumably not much interest from users and (b) because the current implementation requires C++17 while Boost.Container supports C++03.
I would like to ask if there is interest in the community for these kinds of containers. I know I would find them useful, and at least one person commented in the PR to the same effect. However, I would still like to see if more people need this.
If there is interest, what would be the preferred course of action?
1. Should we work on inclusion into Boost.Container or maybe some other library? Candidates? Boost.CircularBuffer was mentioned in the PR, although I'm not sure it is suitable for these components. Creating a new submodule is also a possibility, although it seems like an overkill.
2. Somewhat related to p.1, what minimum C++ version is preferred. E.g. if we agree that Boost.Container is the right place for these components, I could work on lowering minimum C++ version, although C++03 would complicate things considerably.
FWIW ... I suspect that code will be easier to write, will work better, be more readable and understandable, and go faster using the most recent C++ std. It ought to be! So I favour a new library Boost.RingQueue. It meets two niche requirements, but neither too small a niche. Paul PS Some links in the docs of all three libraries should refer to a summary of the various pros and cons and use cases. So users can chose the est/right tool for their project.