Check if a type is an instantiation of a template
- by Pedro Lacerda
I have structs like
struct RGBA (T) {/* ... */}
struct BMPFile (DataT) if (is(DataT == RGBA)) {/* ... */}
But is(DataT == RGBA) cannot work because DataT is a type and RGBA is a template. Instead I need check if a type is an instantiation of a template in order to declare file like
BMPFile!(RGBA!ushort) file;
In a comment @FeepingCreature…