This class template implements a value‐semantic container type holding an ordered sequence of key‐value pairs having possibly duplicate keys that provide a mapping from keys (of the template parameter type, KEY) to their associated values (of another template parameter type, VALUE).
Synopsis
Declared in <bslstl_multimap.h>
template<
class KEY,
class VALUE,
class COMPARATOR = std::less<KEY>,
class ALLOCATOR = allocator<pair<KEY const, VALUE>>>
class multimap;
Description
This class: * supports a complete set of value‐semantic operations
-
except for BDEX serialization * is exception‐neutral * is alias‐safe * is
constthread‐safe For terminology see {`bsldoc_glossary`}.
Types
Name |
Description |
This nested class defines a mechanism for comparing two objects of |
Type Aliases
Name |
Description |
Allocator type for this container. |
|
Constant bidirectional iterator over |
|
Constant pointer type for elements in this container. |
|
Constant reference type for elements. |
|
Const reverse iterator type for traversing the multimap in reverse order. |
|
Signed integer type measuring iterator distance. |
|
Bidirectional iterator over |
|
Comparator type for ordering keys. |
|
Key type for this multimap. |
|
Mapped value type for this multimap. |
|
Pointer type for elements in this container. |
|
Modifiable reference type for elements. |
|
Reverse iterator type for traversing the multimap in reverse order. |
|
Unsigned integer type measuring multimap size. |
|
Element type stored in this multimap. |
Member Functions
Name |
Description |
|
Constructors |
|
Destroy this object. |
Assignment operators |
|
|
|
Return an iterator providing non‐modifiable access to the first |
|
Return an iterator providing non‐modifiable access to the past‐the‐end element in the ordered sequence of |
|
Remove all entries from this multimap. Note that the multimap is empty after this call, but allocated memory may be retained for future use. |
|
Return |
|
Return the number of |
|
Return a reverse iterator providing non‐modifiable access to the last |
|
Return a reverse iterator providing non‐modifiable access to the prior‐to‐the‐beginning element in the ordered sequence of |
|
Insert into this multimap a newly‐created |
|
Insert into this multimap a newly‐created |
|
Return |
|
|
|
|
|
|
|
|
|
Return (a copy of) the allocator used for memory allocation by this multimap. |
|
|
|
Insert into this multimap the value of each |
|
Return the key‐comparison functor (or function pointer) used by this multimap; if a comparator was supplied at construction, return its value, otherwise return a default constructed |
|
|
|
Return a theoretical upper bound on the largest number of elements that this multimap could possibly hold. Note that there is no guarantee that the multimap can successfully grow to the returned size, or even close to that size without running out of resources. |
|
|
|
|
|
Return the number of elements in this multimap. |
|
Exchange the value and comparator of this object with those of the specified |
|
|
|
Return a functor for comparing two |
Deduction Guides
Name |
Description |
Deduce the template parameters |
|
Deduce the template parameters |
|
Deduce the template parameters |
|
Deduce the template parameters |
|
Deduce the template parameters |
|
Deduce the template parameters |
|
Deduce the template parameters |
|
Deduce the template parameters |
Non-Member Functions
Name |
Description |
Erase all the elements in the specified multimap |
|
Perform a lexicographic three‐way comparison of the specified |
|
Return |
|
Exchange the value and comparator of the specified |
Created with MrDocs