Home

Awesome

std::ring_span<T>

This code came out of the SG14 working meeting at CppCon 2015. Guy Davidson proposed std::fixed_ring and std::dynamic_ring:

This code proposes just a single, lower-level primitive: std::ring_span, as described in the current revision of P0059:

A ring_span doesn't manage its own memory nor its own objects; it is merely a non-owning (yet mutable) view onto an array of existing objects, providing the following facilities:

For the array_view proposal, see N4177 "Multidimensional bounds, index and array_view"