|
Archives
D Programming
DD.gnu digitalmars.D digitalmars.D.bugs digitalmars.D.dtl digitalmars.D.ide digitalmars.D.dwt digitalmars.D.announce digitalmars.D.learn digitalmars.D.debugger C/C++ Programming
c++c++.announce c++.atl c++.beta c++.chat c++.command-line c++.dos c++.dos.16-bits c++.dos.32-bits c++.idde c++.mfc c++.rtl c++.stl c++.stl.hp c++.stl.port c++.stl.sgi c++.stlsoft c++.windows c++.windows.16-bits c++.windows.32-bits c++.wxwindows digitalmars.empire digitalmars.DMDScript electronics |
digitalmars.D.learn - Template type parameter turns to int
Given program (dmd 2.013):
void foo(T)() {
pragma(msg, T.stringof);
}
void main() {
foo!(bar)();
}
I would expect the compiler to report an error about the unknown identifier,
bar. Instead the program is accepted and the compiler prints "int". Is this a
bug or is there a way to make it give an error?
May 11 2008
mpt wrote: May 11 2008
|