Get class type parameters at compile time

js.mdnq js_adddot+mdng at gmail.com
Thu Dec 13 02:56:09 PST 2012


I need to get the number of type parameters of a class at compile 
time:


class a(T1, T2, ...)
{
    static if (a.TypeInfo.NumParameters == 1)
       ....
    else
       ....

}

Is this possible?


More information about the Digitalmars-d-learn mailing list