Lots of operators support being overloaded by the developer of classes and structs. Although I could show examples of all of them, I’ll limit myself to illustrating a couple of special ones. We also discuss how certain expressions that use operators (such as
?:) are turned into uses of multiple custom operators.
An exhaustive list of all the operators that can be overloaded is shown here. All but a few should look pretty straightforward. The others are the subject of further discussion in the following sections.