You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
push_back() assigns a new value to *end() and increments end().
If the ring-buffer is at capacity, this will cause begin() also to be
incremented; that is, the oldest item in the ring-buffer will be
forgotten. Regardless, push_back() invalidates iterators.
pop_front() performs a customizable action and increments begin().
It also invalidates iterators.
Iteration of the whole buffer (from front to back) is possible
via the usual begin() and end() iterators, or via range-based for loop.
The ring_span itself is a lightweight value type; you can copy it
to get a second (equivalent) view of the same objects. As with array_view
and string_view, any operation that invalidates a pointer in the range
on which a view was created invalidates pointers and references returned
from the view's functions.