operator overloading outside the type

Timon Gehr timon.gehr at gmx.ch
Fri Mar 28 23:27:47 UTC 2025


On 3/28/25 21:54, Jonathan M Davis wrote:
> How overloaded operators do or don't work with a type are a core part of its
> design and affect how it interacts with the language in general, including
> how it interacts with language features, whereas a normal function isn't
> anything special and isn't treated by the language in any special way.

The proposal is not to somehow add the operators to the type using an 
external declaration, just to allow the standard syntax sugar to be used 
to call these functions via UFCS.


More information about the Digitalmars-d mailing list