Object layout in C++ and access control

 

The variables are guaranteed to be laid out contiguously, as in C. However, the access blocks may not appear in the object in the order that you declare them.

Access specifier are part of the structure and donot affect the objects created from the structure. All of the access specification information disappears before the program is run; generally this happens during compilation. In a running program, objects become "regions of storage" and nothing more.    (Page 270)

In fact, the compiler is the only thing that kowns about the protection level of class members. There is no access control information mangled into the member name that carries through to the linker. All the protection checking is done by the compiler; it has vanished by runtime.    (Page 275)

Object layout in C++ and access control,布布扣,bubuko.com

Object layout in C++ and access control

上一篇:误删除innodb ibdata数据文件解决方法


下一篇:SQL查询:『索引失效问题』