static struct S(T) { } static assert(isInstanceOf!(S, S!int)); static void func(T)(); static assert(isInstanceOf!(func, func!int)); template T(U) { } static assert(isInstanceOf!(T, T!int));
See Implementation