dimanche 30 août 2020

What is the common idiom(s) for resetting the moved object?

In C++ move constructor is required to reset the moved object which to me seems to be a duplication of what the destructor does in most of the cases.

Is it correct that defining a reset-method and using it in both destructor and move-constructor is the best approach? Or maybe there are better ways?

Aucun commentaire:

Enregistrer un commentaire