Suppose I have the following:
struct f
{
static int foo()
{
return 42;
}
};
int main()
{
f* x = 0;
return x->foo();
}
Is it UB to do this? I would argue that this is legal because I am not actually dereferencing the null pointer, only using its type info to call a static member function.....