template <typename Key, typename Value, typename Compare = std::less<Key>, typename Alloc = std::allocator<std::pair<const Key, Value>>>
class btree_multimap
Defined at line 526 of file ../../third_party/abseil-cpp/absl/container/btree_map.h
absl::btree_multimap
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>`.
Public Methods
void btree_multimap<Key, Value, Compare, Alloc> ()
Constructors and Assignment Operators
A `btree_multimap` supports the same overload set as `std::multimap`
for construction and assignment:
* Default constructor
absl::btree_multimap
<int
, std::string> map1;
* Initializer List constructor
absl::btree_multimap
<int
, std::string> map2 =
{{1, "huey"}, {2, "dewey"}, {3, "louie"},};
* Copy constructor
absl::btree_multimap
<int
, std::string> map3(map2);
* Copy assignment operator
absl::btree_multimap
<int
, std::string> map4;
map4 = map3;
* Move constructor
// Move is guaranteed efficient
absl::btree_multimap
<int
, std::string> map5(std::move(map4));
* Move assignment operator
// May be efficient if allocators are compatible
absl::btree_multimap
<int
, std::string> map6;
map6 = std::move(map5);
* Range constructor
std::vector
<std
::pair
<int
, std::string>> v = {{1, "a"}, {2, "b"}};
absl::btree_multimap
<int
, std::string> map7(v.begin(), v.end());
Defined at line 572 of file ../../third_party/abseil-cpp/absl/container/btree_map.h