dimanche 4 décembre 2016

Separating copy/move assignment operator

I've read here: Move Semantics, under secondary title: Special member functions, the reasons why we should unify both copy assignment operator & move assignment operator into a single move\copy assignment operator,

but what if we wish to forbid copying or moving? should in this case I indicate "deleted" on the forbidden constructor and implement the other? (i.e. separating between the two).

If so, what is the proper way to do it?

Aucun commentaire:

Enregistrer un commentaire