Annex F (informative) Core undefined behavior [ub]

F.3 [expr]: Expressions [ub.expr]

F.3.19[ub:expr.static.cast.does.not.contain.original.member]
Specified in: [expr.static.cast]

A pointer to member of derived class D can be cast to a pointer to member of base class B (with certain restrictions on cv qualifiers) as long as B contains the original member, or is a base or derived class of the class containing the original member; otherwise the behavior is undefined.
[Example 1: struct A { char c; }; struct B { int i; }; struct D : A, B {}; int main() { char D::*p1 = &D::c; char B::*p2 = static_cast<char B::*>(p1); // undefined behavior, B does not contain the original member c } — end example]