bsl::unordered_multiset

This class template implements a value-semantic container type holding an unordered multiset of values (of template parameter type KEY).

Synopsis

Declared in <bslstl_unorderedmultiset.h>

template<
    class KEY,
    class HASH = bsl::hash<KEY>,
    class EQUAL = bsl::equal_to<KEY>,
    class ALLOCATOR = bsl::allocator<KEY>>
class unordered_multiset;

Description

This class: * supports a complete set of value-semantic operations

  • except for BDEX serialization * is exception-neutral (agnostic except for the at method) * is alias-safe * is const thread-safe For terminology see {bsldoc_glossary}.

Type Aliases

NameDescription
allocator_type This typedef is an alias to the (template parameter) ALLOCATOR.
const_iterator This typedef is an alias to iterator.
const_local_iterator This typedef is an alias to local_iterator.
const_pointer This typedef is an alias to the allocator const-pointer type.
const_reference This typedef is an alias for const_reference.
difference_type This typedef is an alias to the allocator difference type.
hasher This typedef is an alias to the (template parameter) HASH type.
iterator This typedef is an alias to the hash-table iterator type.
key_equal This typedef is an alias to the (template parameter) EQUAL type.
key_type This typedef is an alias to the (template parameter) KEY type.
local_iterator This typedef is an alias to the hash-table local iterator type.
pointer This typedef is an alias to the allocator pointer type.
reference This typedef is an alias to value_type&.
size_type This typedef is an alias to the allocator size type.
value_type This typedef is an alias to key_type.

Member Functions

NameDescription
unordered_multiset [constructor]Constructors
~unordered_multiset [destructor]Destroy this object.
operator= Assignment operators
begin begin overloads
bucket Return the bucket index for the specified key.
bucket_count Return the number of buckets in the array of buckets maintained by this unordered multiset.
bucket_size Return the number of elements in the bucket at index.
cbegin cbegin overloads
cend cend overloads
clear Remove all entries from this unordered multiset. Note that the container is empty after this call, but allocated memory may be retained for future use.
contains Return whether this unordered multiset contains key.
count Return the number of elements equivalent to key.
emplace Emplace a newly constructed element into this unordered multiset.
emplace_hint Emplace a newly constructed element near hint.
empty Return true if this unordered multiset contains no elements, and false otherwise.
end end overloads
equal_range equal_range overloads
erase erase overloads
find find overloads
get_allocator Return (a copy of) the allocator used for memory allocation by this unordered multiset.
hash_function Return (a copy of) the hash unary functor used by this unordered multiset to generate a hash value (of type size_t) for a key_type object.
insert insert overloads
insert_range Insert each element from the specified range.
key_eq Return (a copy of) the key-equality binary functor that returns true if the value of two key_type objects are equivalent, and false otherwise.
load_factor Return the current load factor of this container.
max_bucket_count Return a theoretical upper bound on the number of buckets.
max_load_factor max_load_factor overloads
max_size Return a theoretical upper bound on the size of this container.
rehash Rehash this container to at least numBuckets buckets.
reserve Reserve capacity for at least numElements without rehashing.
size Return the number of elements in this unordered multiset.
swap Exchange the contents of this object with those of other.
operator BloombergLP::bslmf::NestedTraitDeclaration<unordered_multiset, IsBitwiseMoveable, ::BloombergLP::bslmf::IsBitwiseMoveable<HashTable>::value> Nested trait declaration for bslmf::IsBitwiseMoveable.

Deduction Guides

NameDescription
unordered_multiset<KEY> CTAD guide: deduce KEY from initializer_list value_type.
unordered_multiset<KEY> CTAD guide: deduce KEY from initializer_list value_type.
unordered_multiset<KEY> CTAD guide: deduce KEY from iterator value_type.
unordered_multiset<KEY> CTAD guide: deduce KEY from iterator value_type.
unordered_multiset<KEY, HASH> CTAD guide: deduce KEY from initializer_list value_type.
unordered_multiset<KEY, HASH> CTAD guide: deduce KEY from iterator value_type.
unordered_multiset<KEY, HASH, EQUAL> CTAD guide: deduce KEY from initializer_list value_type.
unordered_multiset<KEY, HASH, EQUAL> CTAD guide: deduce KEY from iterator value_type.
unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR> CTAD guide: deduce KEY from initializer_list value_type.
unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR> CTAD guide: deduce KEY from iterator value_type.
unordered_multiset<KEY, HASH, bsl::equal_to<KEY>, ALLOCATOR> CTAD guide: deduce KEY from initializer_list value_type.
unordered_multiset<KEY, HASH, bsl::equal_to<KEY>, ALLOCATOR> CTAD guide: deduce KEY from iterator value_type.
unordered_multiset<KEY, bsl::hash<KEY>, bsl::equal_to<KEY>, ALLOCATOR> CTAD guide: deduce KEY from initializer_list value_type.
unordered_multiset<KEY, bsl::hash<KEY>, bsl::equal_to<KEY>, ALLOCATOR> CTAD guide: deduce KEY from initializer_list value_type.
unordered_multiset<KEY, bsl::hash<KEY>, bsl::equal_to<KEY>, ALLOCATOR> CTAD guide: deduce KEY from iterator value_type.
unordered_multiset<KEY, bsl::hash<KEY>, bsl::equal_to<KEY>, ALLOCATOR> CTAD guide: deduce KEY from iterator value_type.

Friends

NameDescription
bsl::operator==Return true if the specified lhs and rhs objects have the same value, and false otherwise.

Non-Member Functions

NameDescription
erase_ifErase all elements in ms that satisfy predicate.
operator==Return true if lhs and rhs have the same value.
swapExchange the values of the specified a and b objects.