You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
T(T&& obj): data(std::move(obj.data)) { obj.data = nullptr } // enables the resources owned by an rvalue object to be moved into an lvalue without copying
move assignment operator
T& operator=(T&& obj) { data = std::move(obj.data); return *this; } // enables the resources owned by an rvalue object to be moved into an lvalue without copying
This is important because a person is bound to come across these eventually. Although it might be a bit advanced for someone who is just starting out.
The text was updated successfully, but these errors were encountered:
Addition of move constructor
move assignment operator
This is important because a person is bound to come across these eventually. Although it might be a bit advanced for someone who is just starting out.
The text was updated successfully, but these errors were encountered: