Can one get a pointer to a complete object representation element from a pointer to a suboject?
问题 Let's consider this code: int i; int is[10]{}; unsigned char * p = reinterpret_cast<unsigned char*>(&i); //p defined to point to the object-representation of the first element of array ints unsigned char * ps = reinterpret_cast<unsigned char*>(&is[0]); p += sizeof(int); ps += sizeof(int); //now ps points to the end of ints[0] and p point to the end of i; p += sizeof(int); //Undefined behavior according to [expr.add] ps += sizeof(int); //Undefined behavior? unsigned char c = *ps;//Undefined