[#absl-btree_multiset] = xref:absl.adoc[absl]::btree_multiset :relfileprefix: ../ :mrdocs: An ordered associative container of keys that allows equivalent keys. == Synopsis Declared in `<absl/container/btree_set.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< typename Key, typename Compare = std::less<Key>, typename Alloc = std::allocator<Key>> class btree_multiset : public /* implementation-defined */::btree_multiset_container</* implementation-defined */::btree</* implementation-defined */>> ---- == Description An `absl::btree_multiset<K>` is an ordered associative container of keys and associated values designed to be a more efficient replacement for `std::multiset` (in most cases). Unlike `absl::btree_set`, a B‐tree multiset allows equivalent elements. Keys are sorted using an (optional) comparison function, which defaults to `std::less<K>`. An `absl::btree_multiset<K>` uses a default allocator of `std::allocator<K>` 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_multiset<K, C, A>`. == Base Classes [cols="1,4"] |=== | Name| Description | `/* implementation-defined */::btree_multiset_container</* implementation-defined */::btree</* implementation-defined */>>` | |=== == Type Aliases [cols="1"] |=== | Name | xref:absl/btree_multiset/allocator_type.adoc[`allocator_type`] | xref:absl/btree_multiset/const_iterator.adoc[`const_iterator`] | xref:absl/btree_multiset/iterator.adoc[`iterator`] | xref:absl/btree_multiset/key_compare.adoc[`key_compare`] | xref:absl/btree_multiset/key_type.adoc[`key_type`] | xref:absl/btree_multiset/node_type.adoc[`node_type`] | xref:absl/btree_multiset/size_type.adoc[`size_type`] | xref:absl/btree_multiset/value_type.adoc[`value_type`] |=== == Member Functions [cols="1,4"] |=== | Name| Description | xref:absl/btree_multiset/2constructor.adoc[`btree_multiset`] [.small]#[constructor]# | Constructs an empty `btree_multiset`. | xref:absl/btree_multiset/emplace-06.adoc[`emplace`] | | xref:absl/btree_multiset/emplace_hint-0e.adoc[`emplace_hint`] | | xref:absl/btree_multiset/extract-08.adoc[`extract`] | | xref:absl/btree_multiset/insert-0e.adoc[`insert`] | | xref:absl/btree_multiset/merge-05.adoc[`merge`] | |=== == Using Declarations [cols="1"] |=== | Name | xref:absl/btree_multiset/_10using.adoc[`Unnamed using`] | xref:absl/btree_multiset/begin.adoc[`begin`] | xref:absl/btree_multiset/cbegin.adoc[`cbegin`] | xref:absl/btree_multiset/cend.adoc[`cend`] | xref:absl/btree_multiset/clear.adoc[`clear`] | xref:absl/btree_multiset/contains.adoc[`contains`] | xref:absl/btree_multiset/count.adoc[`count`] | xref:absl/btree_multiset/emplace-0c.adoc[`emplace`] | xref:absl/btree_multiset/emplace_hint-06.adoc[`emplace_hint`] | xref:absl/btree_multiset/empty.adoc[`empty`] | xref:absl/btree_multiset/end.adoc[`end`] | xref:absl/btree_multiset/equal_range.adoc[`equal_range`] | xref:absl/btree_multiset/erase.adoc[`erase`] | xref:absl/btree_multiset/extract-0c.adoc[`extract`] | xref:absl/btree_multiset/extract_and_get_next.adoc[`extract_and_get_next`] | xref:absl/btree_multiset/find.adoc[`find`] | xref:absl/btree_multiset/get_allocator.adoc[`get_allocator`] | xref:absl/btree_multiset/insert-07f.adoc[`insert`] | xref:absl/btree_multiset/key_comp.adoc[`key_comp`] | xref:absl/btree_multiset/lower_bound.adoc[`lower_bound`] | xref:absl/btree_multiset/max_size.adoc[`max_size`] | xref:absl/btree_multiset/merge-03.adoc[`merge`] | xref:absl/btree_multiset/size.adoc[`size`] | xref:absl/btree_multiset/swap.adoc[`swap`] | xref:absl/btree_multiset/upper_bound.adoc[`upper_bound`] | xref:absl/btree_multiset/value_comp.adoc[`value_comp`] |=== == Non-Member Functions [cols="1,4"] |=== | Name| Description | xref:absl/erase_if-042.adoc[`erase_if`] | Erases all elements that satisfy the predicate `pred` from the container. | xref:absl/swap-06.adoc[`swap`] | Swaps the contents of two `absl::btree_multiset` containers. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#