Boost logo

Boost :

From: Gavin Lambert (boost_at_[hidden])
Date: 2019-09-09 23:32:50


On 9/09/2019 19:43, Hans Dembinski wrote:
> 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?

I'm curious what you mean by that.

Circularity implies the ability to do random indexing (on the underlying
container, even if hiding this from consumers), thus it should in
principle be compatible with any container that produces random access
iterators -- including array and vector, but not including set.

How would you imagine a "circular set" working?


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