std::map::try_emplace

template <class... Args> pair<iterator, bool> try_emplace(const key_type& k, Args&&... args); (1) (since C++17) template <class... Args> pair<iterator, bool> try_emplace(key_type&& k, Args&&... args); (2) (since C++17) template <class... Args> iterator try_emplace(const_iterator hint, const key_type& k, Args&&... args); (3) (since C++17) template <class... Args> iterator try_emplace(const_iterator hin

std::mask_array::mask_array

mask_array( const mask_array& other ); mask_array() = delete; Constructs a mask_array from another mask_array other. The default constructor is implicitly deleted. Parameters other - mask_array to initialize with

std::mask_array::operators

void operator+=( const std::valarray<T>& other ); void operator-=( const std::valarray<T>& other ); void operator*=( const std::valarray<T>& other ); void operator/=( const std::valarray<T>& other ); void operator%=( const std::valarray<T>& other ); void operator&=( const std::valarray<T>& other ); void operator|=( const std::valarray<T>& other ); void operator^=( const std::vala

std::map::value_compare

class value_compare; std::map::value_compare is a function object that compares objects of type std::map::value_type (key-value pairs) by comparing of the first components of the pairs. Member types Type Definition result_type bool first_argument_type value_type second_argument_type value_type Protected member objects Compare comp the stored comparator (protected member object) Member functions (constructor) constructs a new value_compare object (pro

std::map::rbegin

reverse_iterator rbegin(); const_reverse_iterator rbegin() const; const_reverse_iterator crbegin() const; (since C++11) Returns a reverse iterator to the first element of the reversed container. It corresponds to the last element of the non-reversed container. Parameters (none). Return value Reverse iterator to the first element. Exceptions (none) (until C++11) noexcept specification: noexcept (since C++11) Complexity Constant. See also rend crend r

std::map::rend

reverse_iterator rend(); const_reverse_iterator rend() const; const_reverse_iterator crend() const; (since C++11) Returns a reverse iterator to the element following the last element of the reversed container. It corresponds to the element preceding the first element of the non-reversed container. This element acts as a placeholder, attempting to access it results in undefined behavior. Parameters (none). Return value Reverse iterator to the element following the last

std::map::size

size_type size() const; Returns the number of elements in the container, i.e. std::distance(begin(), end()). Parameters (none). Return value The number of elements in the container. Exceptions (none) (until C++11) noexcept specification: noexcept (since C++11) Complexity Constant. Example The following code uses size to display the number of elements in a std::map: #include <map> #include <iostream> int main() { std::map<int,char> nums {{1, '

std::map::swap

void swap( map& other ); Exchanges the contents of the container with those of other. Does not invoke any move, copy, or swap operations on individual elements. All iterators and references remain valid. The past-the-end iterator is invalidated. The Pred objects must be Swappable, and they are exchanged using unqualified call to non-member swap. If std::allocator_traits<allocator_type>::propagate_on_container_swap::value is true, then the allocators are exchanged using an unq

std::map::lower_bound

iterator lower_bound( const Key& key ); (1) const_iterator lower_bound( const Key& key ) const; (1) template< class K > iterator lower_bound(const K& x); (2) (since C++14) template< class K > const_iterator lower_bound(const K& x) const; (2) (since C++14) 1) Returns an iterator pointing to the first element that is not less than key. 2) Returns an iterator pointing to the first element that compares not less to the value x. This overload

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