Given,
auto a = make_pair(1,"one"); auto b = make_pair(2,"two"); a.swap(b);
When do I really need to use a.swap(b) when there is a more generalized std::swap(a,b) that works the same way.
a.swap(b)
std::swap(a,b)
Aucun commentaire:
Enregistrer un commentaire