Pattern to accept associative arrays

MoonlightSentinel moonlightsentinel at disroot.org
Sun Jul 5 20:32:52 UTC 2020


On Sunday, 5 July 2020 at 19:06:47 UTC, Steven Schveighoffer 
wrote:
> A more "appropriate" signature would be something like this:
>
> void foo(T)(T aa) if (is(T : V[K], K, V))

This doesn't work as expected because one cannot reference 
symbols introduced in a template constraint. You would need to 
redefine K and V inside of foo ...



More information about the Digitalmars-d mailing list