When does invoking a member function on a null instance result in undefined behavior?

Both (a) and (b) result in undefined behavior. It’s always undefined behavior to call a member function through a null pointer. If the function is static, it’s technically undefined as well, but there’s some dispute. The first thing to understand is why it’s undefined behavior to dereference a null pointer. In C++03, there’s actually a … Read more