Skip to Content
The C++ Programming Language, 4th Edition
book

The C++ Programming Language, 4th Edition

by Bjarne Stroustrup
May 2013
Intermediate to advanced
1376 pages
47h 26m
English
Addison-Wesley Professional
Content preview from The C++ Programming Language, 4th Edition

22. Run-Time Type Information

Premature optimization is the root of all evil.

– Donald Knuth

On the other hand, we cannot ignore efficiency.

– Jon Bentley

Introduction

Class Hierarchy Navigation

dynamic cast; Multiple Inheritance; static_cast and dynamic_cast; Recovering an Interface

Double Dispatch and Visitors

Double Dispatch; Visitors

Construction and Destruction

Type Identification

Extended Type Information

Uses and Misuses of RTTI

Advice

22.1. Introduction

In general, a class is constructed from a lattice of base classes. Such a class lattice is often called a class hierarchy. We try to design classes so that users need not be unduly concerned about the way a class is composed out of other classes. In particular, the virtual ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Programming: Principles and Practice Using C++, 3rd Edition

Programming: Principles and Practice Using C++, 3rd Edition

Bjarne Stroustrup

Publisher Resources

ISBN: 9780133522884Purchase Link