X
A type that is a model of Random Access Container
a, b
Object of type
T
The value type of
In addition to the expressions defined in Reversible Container, the following expressions must be valid.
Name | Expression | Type requirements | Return type |
---|---|---|---|
Element access | a[n] |
Semantics of an expression is defined only where it is not defined in Reversible Container, or where there is additional information.
Name | Expression | Precondition | Semantics |
---|---|---|---|
Element access | a[n] | 0 <= n < a.size() | Returns the |
The run-time complexity of element access is amortized constant time.
Element access | The element returned by |
• vector
• deque
The Iterator overview, Random Access Iterator, Sequence
Sequences
Sequence
Category: containers
Component type: concept
A Sequence is a variable-sized Container whose elements are arranged in a strict linear order. It supports insertion and removal of elements.
Forward Container, Default Constructible
None, except for those of Forward Container.
X
A type that is a model of Sequence
a, b
Object of type
T
The value type of
t
Object of type
p, q
Object of type
n
Object of a type convertible to
If
If
In addition to the expressions defined in Forward Container, the following expressions must be valid.
Name | Expression | Type requirements | Return type |
---|---|---|---|