November 29, 2007
Extra diagnosis. The following program:

    import std.stdio;

    template constType(T)
    {
        pragma(msg,T.stringof);

        static const string constType = T.stringof;
    }

    void main()
    {
        writefln(constType!(int));
        writefln(constType!(const(int)));
        writefln(constType!(invariant(int)));
    }

Prints "int" (only) at compile time, and three "int"s at runtime.

It seems the constness of the template parameter is not being passed into the template.