A prvalue of type “pointer to cv1 B
”, where B
is a class type, can be converted to a prvalue of type “pointer to
is a complete class
is the same cv-qualification as,
or greater cv-qualification than, cv1.
is a virtual base class of D
a base class of a virtual base class of D
if no valid standard conversion from “pointer to D
to “pointer to B
” exists ([conv.ptr]
), the program is ill-formed.
The null pointer value ([basic.compound]
) is converted
to the null pointer value of the destination type.
If the prvalue of type
“pointer to cv1 B
” points to a B
actually a base class subobject of an object of type D
, the resulting
pointer points to the enclosing object of type D.
behavior is undefined.