Currently typeof only accepts expressions. I think it would be useful if typeof accepts types as well and just evaluate to the type given. This will make metaprogramming simpler. void foo (alias T) () { alias U = typeof(T); } foo!(3); // ok foo!(Object); // error, Object is not an expression
See bug 1341.
This enhancement does not make any sense. int is not an int, it is a type. 0 is an int. A helper template can be used if an expression is desired that behaves in this way.
I'm agree with Timon.
It has been a long time since this has seen any attention, but I also agree with Timon. How should we go forward with this one? I highly doubt, it will ever be implemented and if so, it might need a DIP?