在多集中插入值

集合中的所有插入方法也适用于多集合。然而,存在另一种可能性,即提供 initializer_list:

auto il = { 7, 5, 12 };
std::multiset<int> msut;
msut.insert(il);