templating opEquals/opCmp (e.g. for DSL/expression templates)

Jacob Carlborg doob at me.com
Tue Feb 12 19:22:23 UTC 2019


On 2019-02-12 14:22, Nicholas Wilson wrote:

> Oh well, more things to discuss at dconf. That whole thread seems to be 
> Walter either being stubborn or not getting it (or both).

Yes, exactly. Why can we overload some operators but not all? Even if a 
language doesn't support operator overloading it's possible to abuse:

int add(int a, int b)
{
     return a - b;
}

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list