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.

Reply via email to