std::unordered_multimap::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_multimap<int,int> contains any elements: #include <unordered_map> #include <iostream> #include <utility> int main() { std::u

std::unordered_multimap::emplace_hint

template <class... Args> iterator emplace_hint( const_iterator hint, Args&&... args ); (since C++11) Inserts a new element to the container, using hint as a suggestion where the element should go. The element is constructed in-place, i.e. no copy or move operations are performed. The constructor of the element type (value_type, that is, std::pair<const Key, T>) is called with exactly the same arguments as supplied to the function, forwarded with std::forward<Args&

std::unordered_multimap::emplace

template< class... Args > iterator emplace( Args&&... args ); (since C++11) Inserts a new element into the container by constructing it in-place with the given args . Careful use of emplace allows the new element to be constructed while avoiding unnecessary copy or move operations. The constructor of the new element (i.e. std::pair<const Key, T>) is called with exactly the same arguments as supplied to emplace, forwarded via std::forward<Args>(args).... If reha

std::unordered_multimap::clear

void clear(); (since C++11) Removes all elements from the container. Invalidates any references, pointers, or iterators referring to contained elements. May invalidate any past-the-end iterators. Parameters (none). Return value (none). Exceptions noexcept specification: noexcept Complexity Linear in the size of the container. See also erase erases elements (public member function)

std::unordered_multimap::count

size_type count( const Key& key ) const; (1) (since C++11) Returns the number of elements with key key. Parameters key - key value of the elements to count Return value Number of elements with key key. Complexity linear in the number of elements with key key on average, worst case linear in the size of the container. See also find finds element with specific key (public member function) equal_range returns range of elements matching a specific key (publi

std::unordered_multimap::bucket

size_type bucket( const Key& key ) const; (since C++11) Returns the index of the bucket for key key. Elements (if any) with keys equivalent to key are always found in this bucket. The returned value is valid only for instances of the container for which bucket_count() returns the same value. The behavior is undefined if bucket_count() is zero. Parameters key - the value of the key to examine Return value Bucket index for the key key. Complexity Constant. See also

std::unordered_multimap

Defined in header <unordered_map> template< class Key, class T, class Hash = std::hash<Key>, class KeyEqual = std::equal_to<Key>, class Allocator = std::allocator< std::pair<const Key, T> > > class unordered_multimap; (since C++11) Unordered multimap is an unordered associative container that supports equivalent keys (an unordered_multimap may contain multiple copies of each key value) and that associates values of another t

std::unordered_multimap::begin(int)

local_iterator begin( size_type n ); (since C++11) const_local_iterator begin( size_type n ) const; (since C++11) const_local_iterator cbegin( size_type n ) const; (since C++11) Returns an iterator to the first element of the bucket with index pos. Parameters n - the index of the bucket to access Return value Iterator to the first element. Complexity Constant. See also end(int) cend(int) returns an iterator to the end of the specified bucket (public m

std::unordered_multimap::begin

iterator begin(); (since C++11) const_iterator begin() const; (since C++11) const_iterator cbegin() const; (since C++11) Returns an iterator to the first element of the container. If the container is empty, the returned iterator will be equal to end(). Parameters (none). Return value Iterator to the first element. Exceptions noexcept specification: noexcept Complexity Constant. Example See also end cend returns an iterator to the end (public member

std::unordered_map::unordered_map

(1) explicit unordered_map( size_type bucket_count = /*implementation-defined*/, const Hash& hash = Hash(), const KeyEqual& equal = KeyEqual(), const Allocator& alloc = Allocator() ); (since C++11) (until C++14) unordered_map() : unordered_map( size_type(/*implementation-defined*/) {} explicit unordered_map( size_type bucket_count, const Hash& hash = Hash(),