I have just read our tutorials (http://www.cplusplus.com/doc/tutorial/classes2/#copy_assignment) about these move constructors and the move assignments.
I didn't understand exactly what this rvalue reference (ex: myClass&&) is and for what we really need it..
With the GNU GCC compiler I am using (with Code::Blocks) these double && are not recognized..
What I have understood from this move constructors and assignments is that all the data we are moving, for ex, from object A to object B is not copied, but just "cut": in cases of pointers, the pointers of the class B point now to the same memory area that the pointers of the class A were pointing, and these last ones become null..
I didn't understand exactly what this rvalue reference (ex: myClass&&
It's a reference (an alias to another object), with certain restrictions on what objects it can be referencing. When you're using that as a function parameter, language guarantees that either that object is going to be destroyed soon after your function returns and no other code would be able to access it, or the code that called your function promised that it doesn't care what's in that object when your function returns.
So you can use this information to trash the contents of that object if you need to, like you said,
the pointers of the class B point now to the same memory area that the pointers of the class A were pointing
I suppose that this technique is not so used
Just like with copy constructors and copy assignment operators, normally you don't write your own: the compiler makes them for you and they get used behind the scenes.