|
Archives
D Programming
DD.gnu digitalmars.D digitalmars.D.bugs digitalmars.D.dtl 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 |
c++ - Compiler Error
The compiler (__DMC__ == 0x84x) is not able to handle the following program:
template < typename T > class A
{
public:
virtual T get() const { return T(5); }
};
template < typename T > class B : public A< T >
{
public:
virtual T get() const { return T(6); }
};
void foo()
{
A< int >* a= new A< int >;
B< int >* b= dynamic_cast< B< int >* >(a); // <<-- Error
}
// command line options
// -c -Ic:\programme\dmars\include\win32;c:\programme\dmars\include -mn -ND
-w- -5 -D_X86_=1 -D_WINDOWS -D_Windows -D__WIN32__ -D__MT__ -g- -DNDEBUG -W
-Ar -Ab -Aw -Ae
Jun 15 2005
|