Learn
Practice
Newsletter
Resources
Resume
New
F
Toggle theme
0
F
Toggle theme
0
Toggle menu
RTTI: typeid and dynamic_cast
Last Updated: May 22, 2026
Low Priority
11 min read
Get Premium
Subscribe to unlock full access to all premium content
Subscribe Now
Reading Progress
0%
On this page
What RTTI Is and Why It Exists
typeid and std::type_info
Static Type vs Dynamic Type with typeid
typeid on a Null Pointer
dynamic_cast for Safe Downcasting
dynamic_cast to References
Cross-Cast Between Sibling Bases
dynamic_cast<void*>
Cost and the Cleaner Alternative
When RTTI Is Actually the Right Tool
Disabling RTTI with -fno-rtti
Putting It All Together
Join Discord
Aa
Notes
Star
Complete
Ask AI
Virtual Destructors
Notes
Star
Complete
Ask AI
Function Templates