1.3.3 - [defns.dynamic.type] - 【定义.动态.类型】

请不要转载本文;请不要以任何形式重新出版,发布本文;请在下载本文 24 小时内将其删除;禁止将本文用于商业目的。

1 General [intro]

1.3 Definitions [intro.defs]
1.3.3 dynamic type [defns.dynamic.type]

 

1 综述 【介绍】

1.3 定义 【介绍.定义】
1.3.3 动态类型 【定义.动态.类型】

 

the type of the most derived object (1.8) to which the lvalue denoted by an lvalue expression refers. [Example: if a pointer (8.3.1) p whose static type is “pointer to class B” is pointing to an object of class D, derived from B (clause 10), the dynamic type of the expression *p is “D.” References (8.3.2) are treated similarly. ] The dynamic type of an rvalue expression is its static type.

 

由一个左值表达式指出的左值所引用的最终派生对象(1.8)的类型。【如果一个静态类型为“类 B 的指针”的指针(8.3.1)p 指向一个派生自 B(第 10 条)的类 D 的一个对象,则表达式 *p 的动态类型为“D”。引用(8.3.2)按照相似规则处理。】一个右值表达式的动态类型就是它的静态类型。

 

PREV [defns.diagnostic] | NEXT [defns.ill.formed]上一页 【定义.诊断】 | 下一页 【定义.病态.形式】
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值