what is equivalent to template template
Erik Smith via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Tue May 3 15:09:34 PDT 2016
> You're close.
>
> An `alias` template parameter can be any symbol, including a
> template. But you can't pass in a template as a runtime
> parameter, so having `F f` in your parameters list is wrong
> (there's nothing to pass anyway; you already have the template,
> which is F).
>
> static void call(alias F, A...)(A a) {
> F(a);
> }
>
> Then instantiate and call the `call` function with the template
> you want:
>
> call!myVariadict(1,2,3);
Works. Thanks!
More information about the Digitalmars-d-learn
mailing list