std::map::operator[]

T& operator[]( const Key& key ); (1) T& operator[]( Key&& key ); (2) (since C++11) Returns a reference to the value that is mapped to a key equivalent to key, performing an insertion if such key does not already exist. 1) Inserts value_type(key, T()) if the key does not exist. This function is equivalent to return insert(std::make_pair(key, T())).first->second; - key_type must meet the requirements of CopyConstructible. - mapped_type must meet the requi

std::map::map

(1) explicit map( const Compare& comp = Compare(), const Allocator& alloc = Allocator() ); (until C++14) map() : map( Compare() ) {} explicit map( const Compare& comp, const Allocator& alloc = Allocator() ); (since C++14) explicit map( const Allocator& alloc ); (1) (since C++11) (2) template< class InputIterator > map( InputIterator first, InputIterator last, const Compare& comp = Compare(), const Allocat

std::map::get_allocator

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

std::map::insert

std::pair<iterator,bool> insert( const value_type& value ); (1) template< class P > std::pair<iterator,bool> insert( P&& value ); (2) (since C++11) std::pair<iterator,bool> insert( value_type&& value ); (2) (since C++17) (3) iterator insert( iterator hint, const value_type& value ); (until C++11) iterator insert( const_iterator hint, const value_type& value ); (since C++11) template< class P > iterator inse

std::map::find

iterator find( const Key& key ); (1) const_iterator find( const Key& key ) const; (2) template< class K > iterator find( const K& x ); (3) (since C++14) template< class K > const_iterator find( const K& x ) const; (4) (since C++14) 1,2) Finds an element with key equivalent to key. 3,4) Finds an element with key that compares equivalent to the value x. This overload only participates in overload resolution if the qualified-id Compare::is_t

std::map::key_comp

key_compare key_comp() const; Returns the function object that compares the keys, which is a copy of this container's constructor argument comp. Parameters (none). Return value The key comparison function object. Complexity Constant. See also value_comp returns the function that compares keys in objects of type value_type (public member function)

std::map::insert_or_assign

template <class M> pair<iterator, bool> insert_or_assign(const key_type& k, M&& obj); (1) (since C++17) template <class M> pair<iterator, bool> insert_or_assign(key_type&& k, M&& obj); (2) (since C++17) template <class M> iterator insert_or_assign(const_iterator hint, const key_type& k, M&& obj); (3) (since C++17) template <class M> iterator insert_or_assign(const_iterator hint, key_type&& k,

std::map::erase

(1) void erase( iterator pos ); (until C++11) iterator erase( iterator pos ); (since C++17) iterator erase( const_iterator pos ); (since C++11) (2) void erase( iterator first, iterator last ); (until C++11) iterator erase( const_iterator first, const_iterator last ); (since C++11) size_type erase( const key_type& key ); (3) Removes specified elements from the container. 1) Removes the element at pos. 2) Removes the elements in the range [first; last),

std::map::equal_range

std::pair<iterator,iterator> equal_range( const Key& key ); (1) std::pair<const_iterator,const_iterator> equal_range( const Key& key ) const; (2) template< class K > std::pair<iterator,iterator> equal_range( const K& x ); (3) (since C++14) template< class K > std::pair<const_iterator,const_iterator> equal_range( const K& x ) const; (4) (since C++14) Returns a range containing all elements with the given key in the con

std::map::emplace_hint

template <class... Args> iterator emplace_hint( const_iterator hint, Args&&... args ); (since C++11) Inserts a new element to the container as close as possible to the position just before hint. 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>