Is there any difference between:
std::map <int,std::pair<T,T>> m;
T t1,t2;
m.emplace(1,std::make_pair(t1,t2));
and:
std::map <int,std::pair<T,T>> m;
T t1,t2;
m.emplace(1,std::move(std::make_pair(t1,t2)));
Is the std::move redunddent here? Will std::map::emplace and perfect forwarding take care of allocating the std::pair directly in the std::map?
Aucun commentaire:
Enregistrer un commentaire