对象解引用成员指针时,成员指针为空指针
C++-Undefined-Behavior-43
示例:
struct T { int i; };
T obj{0};
int T::* mp = nullptr;
cout << obj.*mp; // Undefined behavior
cout << (&obj)->*mp; // Undefined behavior
依据
ISO/IEC 14882:2003 5.5(6)-undefined
ISO/IEC 14882:2011 5.5(6)-undefined