Is there a way to get the types of all template parameters?

Jacob Carlborg via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Thu Jun 4 23:29:47 PDT 2015


On 2015-06-04 15:38, Atila Neves wrote:
> For regular runtime parameters, there's ParameterTypeTuple. How would I
> write an equivalent template for template parameters? i.e.
>
>      void fun(Foo foo, Bar bar)() {}
>
>      alias types = CtParameterTypeTuple!fun; //TypeTuple!(Foo, Bar)
>
> I've tried but my is expression kung fu was weak.

Unfortunately this is not implemented yet. But there's a pull request [1].

[1] https://github.com/D-Programming-Language/dmd/pull/3515

-- 
/Jacob Carlborg


More information about the Digitalmars-d-learn mailing list