Get class type parameters at compile time

Philippe Sigaud philippe.sigaud at gmail.com
Sat Dec 15 13:49:41 PST 2012


>
> Oops ;/ How do I get the number of type arguments if I don't know them
> yet? I know this sort of seems wrong but somehow, to know how to alias the
> class I need to know it's number of arguments. (I don't think it makes too
> much sense with the type system but not sure how to solve the following
> problem without it:
>
> http://forum.dlang.org/thread/**wacupbnlqgrfhaebdssd@forum.**
> dlang.org#post-**yhhtuojlsgiykyrfhngl:40forum.**dlang.org<http://forum.dlang.org/thread/wacupbnlqgrfhaebdssd@forum.dlang.org#post-yhhtuojlsgiykyrfhngl:40forum.dlang.org>
> )
>

I saw your other post. I'll try to understand what you're trying to do in
the dpaste you posted.

I'm not sure I get your question, though. If a type is not known in the
current scope, you cannot determine its number of arguments, because, well,
it's not known.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-learn/attachments/20121215/4ce17d55/attachment.html>


More information about the Digitalmars-d-learn mailing list