From Jason Turner
Watch on YouTube

Summary

Jason explores the complete set of possible assignment operator variants in C++. He explains how the canonical copy and move assignment operators are just two of sixteen possible assignment operator overloads when considering all combinations of const/non-const, lvalue/rvalue references, and reference qualification. The episode demonstrates which variants can be defaulted by the compiler and which must be explicitly implemented or deleted, along with how to strategically delete specific variants to control how your types can be assigned.

Resources

Tags