A Multiple Associative Container is an Associative Container in which there may be more than one element with the same key. That is, it is an Associative Container that does not have the restrictions of a Unique Associative Container.
Associative Container
None, except for those defined by Associative Container
X
A type that is a model of Multiple Associative Container
a
Object of type
t
Object of type
k
Object of type
p, q
Object of type
In addition to the expressions defined in Associative Container, the following expressions must be valid.
Name | Expression | Type requirements | Return type |
---|---|---|---|
Range constructor | X(i, j) X a(i, j); | ||
Insert element | a.insert(t) | X::iterator | |
Insert range | a.insert(i, j) | void |
Name | Expression | Precondition | Semantics | Postcondition |
---|---|---|---|---|
Range constructor | X(i, j) X a(i, j); | Creates an associative container that contains all elements in the range | ||
Insert element | a.insert(t) | Inserts | The size of | |
Insert range | a.insert(i, j) | Equivalent to | The size of |
Average complexity for insert element is at most logarithmic.
Average complexity for insert range is at most
• multiset
• multimap
• hash_multiset
• hash_multimap
[1] At present (early 1998), not all compilers support 'member templates'. If your compiler supports member templates then