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.

Definition

Defined in the standard header set, and in the nonstandard
backward-compatibility header multiset.h.

Template parameters

Parameter

Description

Default

Key

The set's key type and value type. This is also defined as multiset::key_type
and multiset::value_type

Compare

The key comparison function, a Strict Weak Ordering whose
argument type is key_type; it returns true if its first
argument is less than its second argument, and false otherwise.
This is also defined as multiset::key_compare and multiset::value_compare.

New members

Notes

[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.