Multiset has the important property that inserting a new element into a multiset does not invalidate iterators that point to existing elements. Erasing an element from a multiset also does not invalidate any iterators, except, of course, for iterators that actually point to the element that is being erased.
Member Where defined Description value_type Container The type of object, T, stored in the multiset. key_type Associative Container The key type associated with value_type. key_compare Sorted Associative Container Function object that compares two keys for ordering. value_compare Sorted Associative Container Function object that compares two values for ordering. pointer Container Pointer to T. reference Container Reference to T const_reference Container Const reference to T size_type Container An unsigned integral type. difference_type Container A signed integral type. iterator Container Iterator used to iterate through a multiset. const_iterator Container Const iterator used to iterate through a multiset. (Iterator and const_iterator are the same type.) reverse_iterator Reversible Container Iterator used to iterate backwards through a multiset. const_reverse_iterator Reversible Container Const iterator used to iterate backwards through a multiset. (Reverse_iterator and const_reverse_iterator are the same type.) iterator begin() const Container Returns an iterator pointing to the beginning of the multiset. iterator end() const Container Returns an iterator pointing to the end of the multiset. reverse_iterator rbegin() const Reversible Container Returns a reverse_iterator pointing to the beginning of the reversed multiset. reverse_iterator rend() const Reversible Container Returns a reverse_iterator pointing to the end of the reversed multiset. size_type size() const Container Returns the size of the multiset. size_type max_size() const Container Returns the largest possible size of the multiset. bool empty() const Container true if the multiset's size is 0. key_compare key_comp() const Sorted Associative Container Returns the key_compare object used by the multiset. value_compare value_comp() const Sorted Associative Container Returns the value_compare object used by the multiset. multiset() Container Creates an empty multiset. multiset(const key_compare& comp) Sorted Associative Container Creates an empty multiset, using comp as the key_compare object.template <class InputIterator> multiset(InputIterator f, InputIterator l) [1]Multiple Sorted Associative Container Creates a multiset with a copy of a range.
template <class InputIterator> multiset(InputIterator f, InputIterator l, const key_compare& comp) [1]Multiple Sorted Associative Container Creates a multiset with a copy of a range, using comp as the key_compare object. multiset(const multiset&) Container The copy constructor. multiset& operator=(const multiset&) Container The assignment operator void swap(multiset&) Container Swaps the contents of two multisets. iterator insert(const value_type& x) Multiple Associative Container Inserts x into the multiset.
iterator insert(iterator pos, const value_type& x)Multiple Sorted Associative Container Inserts x into the multiset, using pos as a hint to where it will be inserted.
template <class InputIterator> void insert(InputIterator, InputIterator) [1]Multiple Sorted Associative Container Inserts a range into the multiset. void erase(iterator pos) Associative Container Erases the element pointed to by pos. size_type erase(const key_type& k) Associative Container Erases the element whose key is k. void erase(iterator first, iterator last) Associative Container Erases all elements in a range. void clear() Associative Container Erases all of the elements. iterator find(const key_type& k) const Associative Container Finds an element whose key is k. size_type count(const key_type& k) const Associative Container Counts the number of elements whose key is k. iterator lower_bound(const key_type& k) const Sorted Associative Container Finds the first element whose key is not less than k. iterator upper_bound(const key_type& k) const Sorted Associative Container Finds the first element whose key greater than k.
pair<iterator, iterator> equal_range(const key_type& k) constSorted Associative Container Finds a range containing all elements whose key is k.
bool operator==(const multiset&, const multiset&)Forward Container Tests two multisets for equality. This is a global function, not a member function.
bool operator<(const multiset&, const multiset&)Forward Container Lexicographical comparison. This is a global function, not a member function.
[1] This member function relies on member template functions, which at present (early 1998) are not supported by all compilers. If your compiler supports member templates, you can call this function with any type of input iterator. If your compiler does not yet support member templates, though, then the arguments must either be of type const value_type* or of type multiset::const_iterator.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4