From Jason Turner
Watch on YouTube

Summary

Jason explores how to explicitly disable moving from const objects in C++. Following up on his previous episodes about why you cannot move from const and the many variants of assignment operators, he demonstrates how to delete specific constructor and assignment operator overloads that take const rvalue references. This prevents const objects from silently falling back to copy operations when move semantics are used, forcing compilation errors instead.

Resources

Tags