import std.stdio; enum Foo { Hoge } template Bar(T) { const char[] Bar = T.stringof; } template Bar2(T) { const char[] Bar2 = (T[]).stringof; } void main() { writeln(Foo.stringof); writeln(Bar!(Foo)); writeln((Foo[]).stringof); writeln(Bar2!(Foo)); } ======== result ======== int int Foo[] Foo[]