Ordered associative container mapping keys to values, allowing duplicates.
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 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).
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 |
Adaptor that compares |
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 a const iterator to the beginning of this multimap. |
|
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 whether this multimap contains an element equivalent to |
|
|
|
Return a const reverse iterator to the last element, or |
|
Return a const reverse iterator to prior‐to‐beginning. |
|
Emplace a newly constructed element into this multimap. |
|
Emplace a newly constructed element near |
|
Return |
|
|
|
Return the half‐open range of elements equivalent to |
|
|
|
|
|
Return (a copy of) the allocator used for memory allocation by this multimap. |
|
|
|
Insert each element from |
|
Return the key‐comparison functor used by this multimap. |
|
|
|
Return a theoretical upper bound on the size of this multimap. |
|
|
|
|
|
Return the number of elements in this multimap. |
|
Exchange the value and comparator of this object with those of |
|
|
|
Return a functor that compares two |
Deduction Guides
Name |
Description |
Deduce |
|
Deduce |
|
Deduce |
|
Deduce |
|
Deduce |
|
Deduce |
|
Deduce |
|
Deduce |
Non-Member Functions
Name |
Description |
Erase every element of |
|
Perform a lexicographic three‐way comparison of |
|
Return |
|
Exchange the value and comparator of |
Created with MrDocs