Behavior of opEquals
Jonathan M Davis via Digitalmars-d
digitalmars-d at puremagic.com
Fri Sep 4 23:18:42 PDT 2015
On Friday, 4 September 2015 at 20:39:14 UTC, Timon Gehr wrote:
> On 09/04/2015 09:21 PM, H. S. Teoh via Digitalmars-d wrote:
>>
>> Wait, wait, did I miss something? Since when was operator
>> overloading
>> allowed as free functions?
>
> Since UFCS, but DMD does not implement it.
There is nothing in the spec about supporting operator
overloading with free functions, so I don't know where you get
the idea that it's even intended to be a feature. UFCS applies to
functions which use the member function call syntax, and
operators aren't used that way. There is no plan whatsoever to
support operator overloading via free functions.
- Jonathan M Davis
More information about the Digitalmars-d
mailing list