"vbtl在构造函数调用后才建立"我对最后一个回答有点疑问 《深入C++对象模型》里有提到: How might the table containing the virtual function addresses be constructed? In C++, the set of virtual functions capable of being invoked through an object of its class is known at compile time. Moreover, this set is invariant. It cannot be added to nor can a virtual instance be replaced at runtime. The table, therefore, serves only as a passive repository. Since neither its size nor its contents change during program execution, its construction and access can be completely handled by the compiler. No runtime intervention is necessary. 虚表应该是一个编译器行为,在编译的时候就已经创建了
1

相关推荐

不愿透露姓名的神秘牛友
07-09 12:30
点赞 评论 收藏
分享
投递牧原集团等公司7个岗位
点赞 评论 收藏
分享
不愿透露姓名的神秘牛友
07-08 10:39
一个证都没 我能填什么
程序员小白条:别人有,你为什么没有,还是这个道理,社会就是比较,竞争,淘汰,你要安逸,那么就要做好淘汰的准备
点赞 评论 收藏
分享
牛客网
牛客网在线编程
牛客网题解
牛客企业服务