Move Semantics
Transfer ownership of resources from temporaries instead of copying them.
Intermediate
std::vector<int> b = std::move(a); — a is left valid but unspecified (usually empty). Return local objects by value — the compiler moves or elides.
Spotted a mistake or want to add detail? Suggest an improvement — Content Contributors' edits are reviewed by editors before they go live.
Discussion (0)
Sign in or join free to ask questions and discuss this topic.