lundi 17 juillet 2017

Can I insert to the moved container

Can I insert to the moved container like this:

std::unordered_set<int> foo, bar;
bar = std::move(foo);
foo.clear(); // Should I do this?
foo.insert(0);

Aucun commentaire:

Enregistrer un commentaire