Inserting values in a multiset
suggest changeThe range and initializer-list insertion methods from sets also apply to multisets. A multiset allows equivalent keys, so the single-value insert returns an iterator rather than a pair<iterator, bool>. An initializer list (C++11) can be inserted as well:
auto il = { 7, 5, 12 };
std::multiset<int> msut;
msut.insert(il);
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents