std::unordered_multiset::key_eq

key_equal key_eq() const; (since C++11) Returns the function that compares keys for equality. Parameters (none). Return value The key comparison function. Complexity Constant. See also hash_function returns function used to hash the keys (public member function)

std::unordered_multiset::insert

iterator insert( const value_type& value ); (1) (since C++11) iterator insert( value_type&& value ); (2) (since C++11) iterator insert( const_iterator hint, const value_type& value ); (3) (since C++11) iterator insert( const_iterator hint, value_type&& value ); (4) (since C++11) template< class InputIt > void insert( InputIt first, InputIt last ); (5) (since C++11) void insert( std::initializer_list<value_type> ilist ); (6)

std::unordered_multiset::hash_function

hasher hash_function() const; (since C++11) Returns the function that hashes the keys. Parameters (none). Return value The hash function. Complexity Constant. See also key_eq returns the function used to compare keys for equality (public member function)

std::unordered_multiset::get_allocator

allocator_type get_allocator() const; (since C++11) Returns the allocator associated with the container. Parameters (none). Return value The associated allocator. Complexity Constant.

std::unordered_multiset::find

iterator find( const Key& key ); (1) const_iterator find( const Key& key ) const; (2) 1,2) Finds an element with key equivalent to key. Parameters key - key value of the element to search for Return value Iterator to an element with key equivalent to key. If no such element is found, past-the-end (see end()) iterator is returned. Complexity Constant on average, worst case linear in the size of the container. Example #include <iostream> #includ

std::unordered_multiset::erase

iterator erase( const_iterator pos ); (1) (since C++11) iterator erase( const_iterator first, const_iterator last ); (2) (since C++11) size_type erase( const key_type& key ); (3) (since C++11) Removes specified elements from the container. 1) Removes the element at pos. 2) Removes the elements in the range [first; last), which must be a valid range in *this. 3) Removes all elements with the key equivalent to key. References and iterators to the erased elements are inv

std::unordered_multiset::equal_range

std::pair<iterator,iterator> equal_range( const Key& key ); (since C++11) std::pair<const_iterator,const_iterator> equal_range( const Key& key ) const; (since C++11) Returns a range containing all elements with key key in the container. The range is defined by two iterators, the first pointing to the first element of the wanted range and the second pointing past the last element of the range. Parameters key - key value to compare the elements to Re

std::unordered_multiset::end(int)

local_iterator end( size_type n ); (since C++11) const_local_iterator end( size_type n ) const; (since C++11) const_local_iterator cend( size_type n ) const; (since C++11) Returns an iterator to the element following the last element of the bucket with index n. . This element acts as a placeholder, attempting to access it results in undefined behavior. Parameters n - the index of the bucket to access Return value iterator to the element following the last eleme

std::unordered_multiset::end

iterator end(); (since C++11) const_iterator end() const; (since C++11) const_iterator cend() const; (since C++11) Returns an iterator to the element following the last element of the container. This element acts as a placeholder; attempting to access it results in undefined behavior. Parameters (none). Return value Iterator to the element following the last element. Exceptions noexcept specification: noexcept Complexity Constant. See also begin cbegin

std::unordered_multiset::empty

bool empty() const; (since C++11) Checks if the container has no elements, i.e. whether begin() == end(). Parameters (none). Return value true if the container is empty, false otherwise. Exceptions noexcept specification: noexcept Complexity Constant. Example The following code uses empty to check if a std::unordered_multiset<int> contains any elements: #include <unordered_set> #include <iostream> int main() { std::unordered_multiset<int>