On 9/9/19 12:43 AM, Hans Dembinski via Boost wrote:
On 5. Sep 2019, at 17:52, Bjorn Reese via Boost
wrote: I am working on a circular queue library that contains a non-owning circular span, a fixed-sized circular array, and a dynamically resizable circular vector.
It looks like circular span can adapt any suitable STL container into a circular one. In fact, circular array and vector are implemented by inheriting privately from std::array and circular::span, which is nice. However, wouldn't it be more general to provide a circular_adaptor, which works with any vector or array, and perhaps even any STL container? Perhaps someone wants a circular set?
FYI - I used such a library as an example in my CppCon Talk about how to write documentation for a C++ library: https://www.youtube.com/watch?v=YxmdCxX9dMk&t=3s The talk was about documentation, but as a side effect produced a library component similar to the above. If any one want's to make use of this - fine by me. One benefit would be that he who programs wouldn't have to write documentation - it's already done!
Would you be interested in adding such a library to Boost?
The design is inspired by Boost.CircularBuffer, std::span, and P0059R4 std::experimental::ring_span.
The code can be found at:
https://github.com/breese/trial.circular
The documentation can be found at:
This is the source, the renderable documentation is here:
https://github.com/breese/trial.circular/blob/develop/doc/circular.adoc
The rationale is short, I would like to know why I should use this instead of boost.circular_buffer.
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost