Quote Originally Posted by Peter_APIIT
What is conclusion about this topic ? Why this will happen ?
The conclusion is that C++ will not keep you from shooting yourself in the foot if you are hell-bent on doing so. Compiler rules exist to keep sane programmers from making mistakes, not to keep insane programmers from deliberately breaking them. I think Graham hit the nail on the head with this earlier.

It is worth mentioning that unions may not contain non-POD types, so this "method" of accessing private data doesn't apply to the vast majority of classes. You can still use pointers to access the data, but that's not the point. The point is don't do it.