The semantics are dynamic_castdescribed in clause 5.2.7 / 8:
If Cis the type of the class that is referenced or referenced T, the execution time is logically performed as follows:
- If, in the derived object itself (indicated) v, vpoints to (refers) to the public base of the class of the subobject of the object C, and if only one object of the type Cderived from the subobject to which it points (refers) to the vresult (refers) to this object C.
- , v () C, , () C .
- .
9:
- null . std::bad_cast (18.7.2).
. , <typeinfo> std::badcast.
user3920237