Value type | X::value_type | The type of the object stored in a container. The value type must be Assignable, but need not be DefaultConstructible. [2] |
Iterator type | X::iterator | The type of iterator used to iterate through a container's elements. The iterator's value type is expected to be the container's value type. A conversion from the iterator type to the const iterator type must exist. The iterator type must be an input iterator. [3] |
Const iterator type | X::const_iterator | A type of iterator that may be used to examine, but not to modify, a container's elements. [3] [4] |
Reference type | X::reference | A type that behaves as a reference to the container's value type. [5] |
Const reference type | X::const_reference | A type that behaves as a const reference to the container's value type. [5] |
Pointer type | X::pointer | A type that behaves as a pointer to the container's value type. [6] |
Distance type | X::difference_type | A signed integral type used to represent the distance between two of the container's iterators. This type must be the same as the iterator's distance type. [2] |
Size type | X::size_type | An unsigned integral type that can represent any nonnegative value of the container's distance type. [2] |
X
A type that is a model of Container
a, b
Object of type
T
The value type of
The
The
A
In addition to the expressions defined in Assignable, EqualityComparable, and LessThanComparable, the following expressions must be valid.
Name | Expression | Return type |
---|---|---|
Beginning of range | a.begin() | |
End of range | a.end() | |
Size | a.size() | size_type |
Maximum size | a.max_size() | size_type |
Empty container | a.empty() | Convertible to |