Determine if a type if derived from a template parameter

rikki cattermole rikki at cattermole.co.nz
Wed Apr 10 19:32:49 UTC 2019


void main()
{
     alias Y = X!(int, long);

     static if (is(Y : X!(W, Z), W, Z)) {
         pragma(msg, W, " ", Z);
     }

}

class X(T,S)
{
    T x;
    S y;
}


More information about the Digitalmars-d mailing list