Is there a way to get the types of all template parameters?
ketmar via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Thu Jun 4 07:12:08 PDT 2015
On Thu, 04 Jun 2015 13:38:18 +0000, 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.
actually, you can't. uninstantiated template cannot be processed by
anything, as it's not semanticed yet. and to semantic it, you have to
instantiate it.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-learn/attachments/20150604/238bf461/attachment.sig>
More information about the Digitalmars-d-learn
mailing list