Check whether a type is a instantiated by a template struct

Henning Pohl henning at still-hidden.de
Sat Aug 11 11:51:34 PDT 2012


So the struct is defined as:

struct S(T) {
}

template isS(T) {
     // ...
}

static assert(isS(S!float));
static assert(!isS(float));

There may be some nasty ways using fullQualifiedName!T and so on 
but I guess there is a better way, isn't it?


More information about the Digitalmars-d-learn mailing list