[DIP] Resolution of Alias Template Parameters in Function Templates
jmh530
john.michael.hall at gmail.com
Mon May 20 17:35:23 UTC 2019
On Monday, 20 May 2019 at 14:45:59 UTC, jmh530 wrote:
> [snip
>
> Hmm, the link to the DIP isn't working for me now.
>
Ah, found it again
https://github.com/baziotis/DIPs/blob/master/Drafts/1NNN-SB.md
I don't see that "Changing the parameter type might not be
enough" caveat as being that big of an issue. I see the problem
as coming from the alias
alias TemplateAlias(S, V) = TemplateType!(S);
There is no reason for V to be there. You could just as easily
write
alias TemplateAlias(S, V = null) = TemplateType!(S);
However, the user may not be able to change TemplateAlias, in
which case something like
alias TemplateAlias(S) = TemplateAlias!(S, typeof(null));
might be an acceptable solution I think.
More information about the Digitalmars-d
mailing list