C ++ v-table:部分语言还是编译器依赖? [英] C++ v-table: Part of the language or compiler dependent?

查看:119
本文介绍了C ++ v-table:部分语言还是编译器依赖?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

v表(虚拟方法表)是C ++规范的一部分,还是由编译器解决虚拟方法查找?

Is the v-table (virtual method table) a part of the C++ specification, or is it up to the compiler to solve the virtual method lookups?

如果它是规范的一部分:为什么?

In case it's part of the spec: Why?

'

(参考资料非常受欢迎!)

(References are very welcome!)

推荐答案


1.7 C ++内存模型
* * [...]语言的各种特征,例如
作为引用和虚拟函数,
可能涉及额外的内存
位置,
程序不可访问,但由
实现。 [...]

1.7 The C++ memory model *3* [...] Various features of the language, such as references and virtual functions, might involve additional memory locations that are not accessible to programs but are managed by the implementation. [...]

这取决于实施。

这篇关于C ++ v-table:部分语言还是编译器依赖?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆