Template with default parameter
Adam D Ruppe
destructionator at gmail.com
Fri Mar 11 12:53:56 UTC 2022
On Friday, 11 March 2022 at 12:01:27 UTC, Andrey Zherikov wrote:
> There is some inconsistency between templates and template
> functions as this works as I want to:
Yeah, functions have the special feature of implicit
instantiation from the function arguments. No other template do,
if you want an instance there, you need to specify it as a !().
And since functions can't return aliases to types you can't use
that to get around it. There's no way to do what you want to do,
you either need to write the !() or use a different alias name.
More information about the Digitalmars-d-learn