C++ 23 · Classes, memory and templates

Move instead of copy

Transfer a resource to another object without copying it.

std::vector<int> big(1'000'000);
std::vector<int> other = std::move(big);

Official C++ 23 documentation

More classes, memory and templates commands

All classes, memory and templates commands · C++ 23 cheatsheet

Was this page helpful?