Understand signature of opOpAssign in std/complex.d
Adam D. Ruppe
destructionator at gmail.com
Mon Nov 11 17:04:33 UTC 2019
On Monday, 11 November 2019 at 16:59:57 UTC, Q. Schroll wrote:
> What's the difference of
> is(C R == Complex!R)
> to
> is(C == Complex!R, R)
> then?
Nothing, they do the same thing.
(I'm of the opinion that the first one should actually be illegal
- I thought it was until I checked for this thread - since it is
weird. The general rule is placeholders need to be defined after
the pattern, not before. The `C R == X` thing usually defines R
to be an alias of something that already exists - maybe C itself,
maybe a specialization of X like __parameters - but meh it did
work here so weird and as far as I can tell they are identical.)
More information about the Digitalmars-d-learn
mailing list