Jump to

v03-l4-noExternal

Which one of those operator cannot be defined with external overloading ?

???

The arithmetic operators + (addition) and * can be defined either as object method (internal overloading) or as external function (external overloading). This is the same for the bitwise left shift (also named stream) operator <<. See C++ reference ...

This is not the case for the evaluation operator (), as it need to access the this pointer to the object instance. See C++ reference ....

Note that operator* can also be seen as the indirection operator, that allows to dereference a pointer. But in this case also, it can be defined using external overloading. See C++ reference ...