A CppCon 2025 talk covering C++ move semantics from first principles. Explains the motivation for moves over copies using a custom string class example, covers lvalues vs rvalues, rvalue references, move constructors and move assignment operators, std::move usage and when to avoid it, and named return value optimization (NRVO). Key insight: calling std::move on a return expression can actually prevent NRVO and result in less efficient code than letting the compiler handle it automatically.

1h 3m watch time

Sort: