struct S(T) { T x; } static assert(templateIdentifierOf!(S!int) == "S"); static assert(templateIdentifierOf!(int) == null);
See Implementation