static_cast<>static_cast<> will only check if the types are compatible
In case 1 types are not directly compatible since the re is no operator to describe the copy relation between A and B
In case 2 the cast is a reference cast and as fastfar as the compiler is concerned A* can be casted to B* because they are compatible. The compiler will not know thatwhat the pointer a_ref holds so that's why it allows you to use it. dynamic_cast<>dynamic_cast<> checks the class the pointer points to also.