Category: containers
Component type: concept
A Simple Associative Container is an Associative Container where elements are their own keys. A key in a Simple Associative Container is not associated with any additional value.
None, except for those described in the Associative Container requirements. Simple Associative Container, however, introduces two new type restrictions.
Key type | X::key_type | The type of the key associated with X::value_type . The types key_type and value_type must be the same type. |
Iterator | X::iterator | The type of iterator used to iterate through a Simple Associative Container's elements. The types X::iterator and X::const_iterator must be the same type. That is, a Simple Associative Container does not provide mutable iterators. [1] |
All SkipLists have additional typedefs that specify the content of each element. When defining SkipLists with a key, the X::value_type is a pair<const key_type, data_type>
. All other Skiplists have X::value_type
identical to T. The following types always specify the actual content (rather than a pair or other compound types).
X::mapped_type
is identical to X::data_type
in a Pair Associative Container.
X::mapped_type
is identical to X::value_type
in all other skiplist containers.
Mapped type | X::mapped_type | In keyed SkipLists, identical to X::data_type . Otherwise, identical to X::value_type . |
Const mapped type | X::const_mapped_type | Const version of X::mapped_type |
Mapped reference | X::mapped_type_reference | Reference version of X::mapped_type |
Cosnt mapped reference | X::const_mapped_type_reference | Const reference version of X::mapped_type |
X | A type that is a model of Simple Associative Container |
a | Object of type X |
k | Object of type X::key_type |
p , q | Object of type X::iterator |
None, except for those defined in the Associative Container requirements.
Immutability of Elements | Every element of a Simple Associative Container is immutable. Objects may be inserted and erased, but not modified. [1] |
[1] This is a consequence of the Immutability of Keys invariant of Associative Container. Keys may never be modified; values in a Simple Associative Container are themselves keys, so it immediately follows that values in a Simple Associative Container may not be modified.