将向量分配给多集

use*_*947 0 c++ stl vector multiset c++11

有没有什么好方法可以将std :: vector分配给std :: multiset?当然不是迭代.我看到在C++ 11中有类似初始化列表的东西,也许它可以以某种方式使用?

us2*_*012 10

vector<int> v;
//fill your vector
multiset<int> m (v.begin(), v.end());
Run Code Online (Sandbox Code Playgroud)