must be | |
X::value_compare | The type of a Strict Weak Ordering used to compare values. Its argument type must be |
X
A type that is a model of 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 Associative Container and Reversible Container, the following expressions must be valid.
Name | Expression | Return type |
---|---|---|
Default constructor | X() X a; | |
Constructor with compare | X(c) X a(c); | |
Key comparison | a.key_comp() | X::key_compare |
Value comparison | a::value_compare() | X::value_compare |
Lower bound | a.lower_bound(k) | |
Upper bound | a.upper_bound(k) | |
Equal range | a.equal_range(k) |
Name | Expression | Semantics | Postcondition |
---|---|---|---|
Default constructor | X() X a; | Creates an empty container, using | The size of the container is |
Constructor with compare | X(c) X a(c); | Creates an empty container, using | The size of the container is |
Key comparison | a.key_comp() | Returns the key comparison object used by | |
Value comparison | a::value_compare() | Returns the value comparison object used by |
Вы читаете Standard Template Library Programmer's Guide