On 1/17/21 3:41 PM, Paul wrote:
On Sunday, 17 January 2021 at 16:42:27 UTC, Steven Schveighoffer wrote:

This works:

void TFoo(T : U[], U)(T a)

Oh cool, that's surprising to say the least. Thanks! This indeed works with argument deduction :)

It's basically saying if T matches the pattern U[] for some U (which is actually defined now inside the function), then it's a match (and preferred over the non-specialized template).

-Steve

Reply via email to