What's the status of old-style operator overloads in D2?

monarch_dodra via Digitalmars-d digitalmars-d at puremagic.com
Tue Apr 22 07:38:56 PDT 2014


On Tuesday, 22 April 2014 at 14:21:42 UTC, Andrej Mitrovic wrote:
> this brought up some issues w.r.t. the compilation performance 
> when using templates and potential object bloat as well.

If templates are an issue, you can always just write a 
non-template function, and template the alias:

```D
alias opUnary(string : "++") = operatorIncrement;

auto operatorIncrement()
{
     ...
}
```


More information about the Digitalmars-d mailing list