Additional Binary Operators

deadalnix deadalnix at gmail.com
Mon Mar 4 20:35:37 PST 2013


On Monday, 4 March 2013 at 23:17:33 UTC, Marco Leise wrote:
> Am Mon, 04 Mar 2013 23:36:29 +0100
> schrieb "bearophile" <bearophileHUGS at lycos.com>:
>
>> jerro:
>> 
>> > Of course, expression templates should also be much easier
>> > to implement in D than they are in C++.
>> 
>> I don't remember seeing them implemented in D, so far.
>> 
>> Bye,
>> bearophile
>
> It's not as easy to do without C++'s convoluted constructor
> lookup rules. The clean approach of D makes it impossible to
> call a constructor implicitly like they do on the Wikipedia
> page about expression templates.
> But the approach with a small DSL looks ok, too. Not quite as
> seamless as the C++ version though.

You can use alias this to create implicit conversion.


More information about the Digitalmars-d mailing list