templating opEquals/opCmp (e.g. for DSL/expression templates)
Nicholas Wilson
iamthewilsonator at hotmail.com
Tue Feb 12 06:07:43 UTC 2019
On Tuesday, 12 February 2019 at 04:42:39 UTC, Jonathan M Davis
wrote:
> Weren't D's overloaded operators designed specifically with the
> idea that they _wouldn't_ support stuff like expression
> templates?
Well you can but only with non-relational operators. IIRC they
were designed s.t. you only needed to define one function to get
a suite of operators (c.f. C++).
> They're supposed to emulate the built-in types with how normal
> equality and the like works, not be used for creating new
> syntax.
Well the syntax is still the same, just the meaning is different.
More information about the Digitalmars-d
mailing list