A prvalue
v of type “pointer to
cv D”, where
D
is a complete class type, can be converted to a prvalue of type “pointer to
cv B”, where
B is a base class (
[class.derived])
of
D. If
v is a null pointer value,
the result is a null pointer value
. Otherwise,
if
B is a virtual base class of
D and
v does not point to an object
whose type is similar (
[conv.qual]) to
D and
that is
within its lifetime or
within its period of construction or destruction (
[class.cdtor]),
the behavior is undefined
. Otherwise,
the result is a pointer to the base class subobject of
the derived class object
.