You can apply operator dynamic_cast only to polymorphic objects (a polymorphic object is one that has at least one virtual member function). This is a requirement of the C++ standard. There are two reasons for this restriction. In order to perform a dynamic cast, the implementation needs to access the runtime type information of the object to which dynamic_cast is applied. This information is retrieved through the object’s vptr, and as you probably know, only polymorphic objects have a vptr. However, there’s another reason for this restriction?a philosophical one: the type of a non-polymorphic object is static and can be determined at compile time. Therefore, there’s not much point in generating runtime type information for non-polymorphic objects in the first place. Note also that some compilers require that you switch on a compiler option in order to enable RTTI support.


GM Creates Open Source uProtocol and Invites Automakers to Adopt It: Revolutionizing Automotive Software Development.
General Motors (GM) recently announced its entry into the Eclipse Foundation. The Eclipse Foundation is a prominent open-source software foundation. In addition, GMC announced its contribution of “uProtocol” to facilitate