Several times I use a limited interface through vector or another mutable sequence (sequence adapter) that only allows push_back and clear . It has some nice property, such as, an iterator can be constructed based on an index that is always stable (for example, stable_vector , but also has an adjacency of elements) and, therefore, can be stored without fear of invalidation if it is not cleared.
I want to use an adapter class instead of vector or another sequence to emphasize the interface (and also to prevent an accidental error using unsupported operations such as insert , erase , etc.).
Is there any existing ADT that matches this append_only sequence? Otherwise, can anyone recommend a suitable name for this sequence adapter?
c ++ containers sequence
abir
source share