工具链二进制文件默认支持C++异常和RTTI(运行时类型识别)。
The toolchain binaries *do* support C++ exceptions and RTTI by default.
这三个特性都对代码的大小有负面的影响,而且异常事件和运行时类型识别还会增加执行时间。
All three of these negatively impact code size, and exceptions and runtime type identification also increase execution time.
如果源代码没有使用dynamic_cast或者typeid操作符,那么就可以禁用运行时类型识别(RTTI)。
If the sources don't use dynamic_cast or the typeid operator, Run Time type Identification (RTTI) might be disabled.
通过运行时类型识别(RTTI),程序能够使用基类的指针或引用来检索这些指针或引用所指对象的实际派生类型。
Run-time Type Identification (RTTI) allows programs that use pointers or references to base classes to retrieve the actual derived types of the objects to which these pointers or references refer.
fno-rtti -qnortti对于异常处理和typeid 和 dynamic_cast 操作符的使用,禁止生成运行时类型 –qrtti识别(RTTI)。
fno-rtti -qnortti Disables generation of runtime type -qrtti identification (RTTI) for exception handling and for use by typeid and dynamic_cast operators. On XL C/C++, the default is -qnortti.
现在,如果在运行时作为基类型传递派生的子类,那么无法通过检查接口参数类型识别出子类。
When you now try to pass a derived subclass in terms of a base type at run time, the subclasses will not be recognized by simply introspecting the interface parameter types.
对于工具使用的这些类型的开发时抽象,即使运行时未显式识别或支持它们,元数据也必须能够捕获它们。
Metadata must be able to capture these types of development-time abstractions used by tools, even though the abstractions are not recognized or supported explicitly by the runtime.
对于工具使用的这些类型的开发时抽象,即使运行时未显式识别或支持它们,元数据也必须能够捕获它们。
Metadata must be able to capture these types of development-time abstractions used by tools, even though the abstractions are not recognized or supported explicitly by the runtime.
应用推荐