- RTTI是Runtime Type Identification的缩写,意思是运行时类型识别。
- C++通过以下的两个操作提供RTTI:
typeid运算符,该运算符返回其表达式或类型名的实际类型。dynamic_cast运算符,该运算符将基类的指针或引用安全地转换为派生类类型的指针或引用。
Expand file tree
/
Copy pathRTTI.md
More file actions
/
Copy pathRTTI.md
File metadata and controls
6 lines (6 loc) · 423 Bytes
Edit and raw actions