I have read other questions like 1347691 and know that what dynamic and static types are.
However, I am curious why the dynamic type is not known until runtime. After all, we human beings can decide the dynamic type by looking through the code. Why can't the compiler do that?
Actually we can use typeid to decide the so-called run-time type. Programming/RTTI.
So why in the book "C++ primer 5th", the author still says
dynamic type is not known until runtime
So can you tell me what type shape is, from looking at the code at compile time?