Inserting values in a multiset

suggest change

The 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);

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents