On Thursday, 23 January 2014 at 16:21:39 UTC, Frustrated wrote:
                static if (T is A)

Try:

static if(is(T : A)) {}


The is() thingy is different than the is operator. T:A means "T implicitly converts to A", so if T is a class implementing interface A, that would pass.

There's also is(T == A) if you want a more specific check, as well as IIRC 5 other forms of the is() thing which get weirder but all do a specific task.

Reply via email to