RAD Studio |  |

Overloading The Class Member Access Operators ->
See Also
Collapse All

Syntax

Copy Code

    postfix-expression -> primary-expression

Description

The expression x->m, where x is a class X object, is interpreted as (x.operator->())->m, so that the function operator->() must either return a pointer to a class object or return an object of a class for which operator-> is defined.

The operator->() can only be overloaded as a nonstatic member function.

See Also

Example Of Overloading Operators

Overloaded Operators And Inheritance

Overloading Binary Operators

Overloading Operator Functions

Overloading The Assignment Operator =

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!