cppreference.com -> C++ Multimaps -> Details

C++ Multimaps


begin

Syntax:

  iterator begin();

The function begin() returns an iterator to the first element in the multimap.


clear

Syntax:

  void clear();

The clear() function deletes all elements from the multimap.


count

Syntax:

  size_type count( const key_type &key );

The function count() returns the number of occurrences of key in the multimap.


empty

Syntax:

  bool empty();

The function empty() returns true if the multimap is empty, and false otherwise.


end

Syntax:

  iterator end();

The end() function returns an iterator to the end of the multimap.


equal_range

Syntax:

  pair equal_range( const key_type &key );

The function equal_range() returns two iterators - one to the first element that contains key, another to the last element that contains key.


erase

Syntax:

  void erase( iterator pos );
  void erase( iterator start, iterator end );
  size_type erase( const key_type &key );

The erase function() either erases the element at pos, erases the elements between start and end, or erases all elements that have the value of key.


find

Syntax:

  iterator find( const key_type &key );

The find() function returns an iterator to key, or an iterator to the end of the multimap if key is not found.


get_allocator

Syntax:

  allocator_type get_allocator();

The get_allocator() function returns the allocator of the multimap.


insert

Syntax:

  iterator insert( iterator pos, const TYPE &val );
  void insert( input_iterator start, input_iterator end );
  pair insert( const TYPE &val );

The function insert() either:


key_comp

Syntax:

  key_compare key_comp();

The function key_comp() returns the function that compares keys.


lower_bound

Syntax:

  iterator lower_bound( const key_type &key );

The lower_bound() function returns an iterator to the first element which has a value greater than or equal to key.


max_size

Syntax:

  size_type max_size();

The function max_size() returns the maximum number of elements that the multimap can hold.


rbegin

Syntax:

  reverse_iterator rbegin();

The rbegin() function returns a reverse iterator to the end of the multimap.


rend

Syntax:

  reverse_iterator rend();

The function rend() returns a reverse iterator to the start of the multimap.


size

Syntax:

  size_type size();

The function size() returns the number of elements currently in the multimap.


swap

Syntax:

  void swap( multimap &obj );

The swap() function exchanges the elements in obj with those in the current multimap.


upper_bound

Syntax:

  iterator upper_bound( const key_type &key );

The function upper_bound() returns an iterator to the first element in the multimap with a key greater than key.


value_comp

Syntax:

  value_compare value_comp();

The value_comp() function returns the function that compares values.