I was just reading This C++0x Beginner Tutorial: http://www.daniweb.com/software-development/cpp/tutorials/373787/beginning-c0x-making-a-raii-class
And I was confused by something:
Obviously, this type of constructor would allow the transfer of the resource, since the source object can be modified and put into an empty-state (or "zombie-state"). But there are two problems with the above, which make it an impractical solution. First, a temporary object, formally referred to as anrvalue, cannot be bound to a non-const reference, meaning that this constructor will not be able to move resources from a temporary object to the newly constructed object."
I have a question here: Isn't the compiler-generated copy constructor called if I used an rvalue like int_vector(int_vector(5)) and it gets a shallow copy of the temporary object just like the move constructor?
Thanks in advance,