RAD Studio |  |

Overloading Binary Operators
See Also
Collapse All

You can overload a binary operator by declaring a nonstatic member function taking one argument, or by declaring a non-member function (usually friend) taking two arguments. If @ represents a binary operator, x@y can be interpreted as either x.operator@(y) or operator@(x,y) depending on the declarations made. If both forms have been declared, standard argument matching is applied to resolve any ambiguity.

See Also

Example Of Overloading Operators

Overloaded Operators And Inheritance

Overloading Operator Functions

Overloading The Assignment Operator =

Overloading The Class Member Access Operators ->

Overloading The Function Call Operator ( )

Overloading The Subscript Operator []

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!