码迷,mamicode.com
首页 > 数据库 > 详细

Object layout in C++ and access control

时间:2014-05-01 04:11:22      阅读:543      评论:0      收藏:0      [点我收藏+]

标签:com   class   c   t   sp   art   int   ble   re   cti   app   

 

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

标签:com   class   c   t   sp   art   int   ble   re   cti   app   

原文地址:http://www.cnblogs.com/ruccsbingo/p/3702098.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!