Description
multiset is a container that represents a mathematical set of elements. Unlike set, duplication is allowed in the set, so that inserting the same element more than once is supported. The set is represented in an ordered form, according to the default comparison template less<Key>. A user-supplied ordering template can also be used.
Declaration
template <class Key, class Cmp = less<Key>, class A = allocator<Key> > class std::multiset;
Concept
The sample program inserts some elements into a set, checks whether element 5 is in the set, erases element 4, and then displays the resulting set. The template greater<int> is used for ordering purposes. The output is 5 2 2 1.
Supported
Supported
Supported