DIP63 : operator overloading for raw templates
Dicebot via Digitalmars-d
digitalmars-d at puremagic.com
Mon Jun 16 11:04:27 PDT 2014
On Monday, 16 June 2014 at 08:56:24 UTC, Marc Schütz wrote:
> I guess there's no way around it, but it seems inconsistent
> that the operators are defined as templated aliases instead of
> functions as anywhere else. Could you add a paragraph to the
> DIP which points this out and give a short justification?
Updated with QA.
Q: It seems inconsistent that the operators are defined as
templated aliases instead of functions as anywhere else.
A: To be able to mimic semantics of template argument lists such
overloaded operators need to be able to return types and symbols
which is not possible with function. However, planned
implementation should accept functions too, as well as anything
that fits `Symbol.opSlice!(a, b)` call pattern.
More information about the Digitalmars-d
mailing list