polymorphic
一词(在括号中)不是在§1.3.7 动态类型 中吗?
[ Example: if a pointer (8.3.1) p whose static type is “pointer to class B” is pointing to an object of a (
polymorphic
) class D, derived from B (Clause 10), the dynamic type of the expression *p is “D.” References (8.3.2) are treated similarly. —end example ]
最佳答案
首先,即使我们想在这种情况下要求多态性,将该要求强加给 B
类而不是 D
会更有意义(因此D
也会变成多态的)。
其次,动态类型的一般概念不以任何方式依赖于多态性。
关于c++ - §1.3.7 (N4140) 中是否缺少 `polymorphic` 一词?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31683281/