先不说insert与emplace之间的区别,只说emplace。emplace允许construct element in place without move or copy.使用forwarding和variadic template(可变模板)来forward arguments to the constructor of the key-value pair.
template<class... Args>
std::pair<iterator,bool> emplace(Args&&... args);