For an instance of a non-POD class, can I always assume that any operation on it should be type-safe, any wrong or even trick code to violate this is UB in C++ spec? For example, here are some ways:
union { Type1 *p1; Type2 *p2; }; or union { Type1 t1; Type2 t2; }; or void *p = Type1 *p1; Type2 *p2 = p; p2->xxx; Feng