Associative Container, Unique Associative Container, Unique Sorted Associative Container, Multiple Sorted Associative Container
Unique Sorted Associative Container
Category: containers
Component type: concept
A Unique Sorted Associative Container is a Sorted Associative Container that is also a Unique Associative Container. That is, it is a Sorted Associative Container with the property that no two elements in the container have the same key.
Sorted Associative Container, Unique Associative Container
None, except for those described in the Sorted Associative Container and Unique Associative Container requirements.
X
A type that is a model of Unique Sorted Associative Container
a
Object of type
t
Object of type
k
Object of type
p, q
Object of type
c
Object of type
In addition to the expressions defined in Sorted Associative Container and Unique Associative Container, the following expressions must be valid.
Name | Expression | Type requirements | Return type |
---|---|---|---|
Range constructor | X(i, j) X a(i, j); | ||
Range constructor with compare | X(i, j, c) X a(i, j, c); | ||
Insert with hint | a.insert(p, t) | 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 of the elements in the range | ||
Range constructor with compare | X(i, j, c) X a(i, j, c); | Creates an associative container that contains all of the elements in the range | ||
Insert with hint | a.insert(p, t) | Inserts |