C++ v-table: Part of the language or compiler dependent?

后端 未结 2 709
你的背包
你的背包 2020-12-06 12:01

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 spe

2条回答
  •  眼角桃花
    2020-12-06 12:31

    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. [...]

    There you have it. It is up to the implementation.

提交回复
热议问题