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.
Related C++ Standard Sections
This episode covers topics found in these sections of the C++ standard:
-
[class.copy.assign]76% match -
[over.assign]50% match -
[special]49% match -
[valarray.assign]48% match