An ordered associative container of keys and associated values that allows equivalent keys.
Synopsis
Declared in <absl/container/btree_map.h>
template<
typename Key,
typename Value,
typename Compare = std::less<Key>,
typename Alloc = std::allocator<std::pair<Key const, Value>>>
class btree_multimap
: public /* implementation-defined */::btree_multimap_container</* implementation-defined */::btree</* implementation-defined */>>
Description
An absl::btree_multimap<K, V> is an ordered associative container of keys and associated values designed to be a more efficient replacement for std::multimap (in most cases). Unlike absl::btree_map, a B‐tree multimap allows multiple elements with equivalent keys.
Keys are sorted using an (optional) comparison function, which defaults to std::less<K>.
An absl::btree_multimap<K, V> uses a default allocator of std::allocator<std::pair<const K, V>> to allocate (and deallocate) nodes, and construct and destruct values within those nodes. You may instead specify a custom allocator A (which in turn requires specifying a custom comparator C) as in absl::btree_multimap<K, V, C, A>.
Base Classes
Name |
Description |
|
Type Aliases
Name |
Member Functions
Name |
Description |
|
Constructs an empty |
Using Declarations
Name |
Non-Member Functions
Name |
Description |
Erases all elements that satisfy the predicate |
|
Swaps the contents of two |
Created with MrDocs