vendredi 19 août 2016

Can't understand the move sematic

I try to understand a new move semantic in C++. Just I want sure that I understood it correctly.

  • When we write a move constructor it must remove existing resources and take resource of the argument.

  • When we write an assignment operator it must destroy resources of the right argument?!

So, a = b in the move semantic removes b. Is it true?
P.S. Sorry, if the question is stupid but I really noobie and can't understand it.

Aucun commentaire:

Enregistrer un commentaire