absl::btree_multiset

An ordered associative container of keys that allows equivalent keys.

Synopsis

Declared in <absl/container/btree_set.h>

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

NameDescription
/* implementation-defined */::btree_multiset_container</* implementation-defined */::btree</* implementation-defined */>>

Type Aliases

Name
allocator_type
const_iterator
iterator
key_compare
key_type
node_type
size_type
value_type

Member Functions

NameDescription
btree_multiset [constructor]Constructs an empty btree_multiset.
emplace
emplace_hint
extract
insert
merge

Using Declarations

Name
Unnamed using
begin
cbegin
cend
clear
contains
count
emplace
emplace_hint
empty
end
equal_range
erase
extract
extract_and_get_next
find
get_allocator
insert
key_comp
lower_bound
max_size
merge
size
swap
upper_bound
value_comp

Non-Member Functions

NameDescription
erase_ifErases all elements that satisfy the predicate pred from the container.
swapSwaps the contents of two absl::btree_multiset containers.