Getting a working example of opIndexAssign using opSlice ... have troubles ...
Alexandru Ermicioi
alexandru.ermicioi at gmail.com
Mon Aug 16 10:48:19 UTC 2021
On Monday, 16 August 2021 at 06:36:02 UTC, james.p.leblanc wrote:
> To be honest, I am not exactly sure what is happening here. I
> am unfamiliar with the "(T : T[])" syntax ... need to read
That is template argument secialization. You're saying that T can
be accept only types that are arrays of T, where : reads as
'extends'.
Now T : T[] might introduce cyclic reference, so more correct
would be: foo(T : Z[], Z)(...)
Here you say that T might accept only types that are arrays of Z
elements.
Regards,
Alexandru.
More information about the Digitalmars-d-learn
mailing list