For two similar object pointer or pointer to data member types
T1 and
T2 (
[conv.qual]),
a prvalue of type
T1 can be explicitly
converted to the type
T2 using a
const_cast
if, considering the qualification-decompositions of both types,
each
P1i is the same as
P2i for all
i. If
v is a null pointer or null member pointer,
the result is a null pointer or null member pointer, respectively
. Otherwise, the result points to or past the end of the same object, or
points to the same member, respectively, as
v.