Checking template parameter types of class

tcak via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sun May 24 20:19:29 PDT 2015


Is there any syntax for something like that:

class Resource(T) if( is(T: FileResource) ){
}


I tried it as above, but it is not accepted. Maybe I am following 
a wrong syntax.

I tried

class Resource(T: FileResource){
}

But it is not accepted as well.


More information about the Digitalmars-d-learn mailing list