std::bad_typeid (3) - Linux Manuals
std::bad_typeid: std::bad_typeid
NAME
std::bad_typeid - std::bad_typeid
Synopsis
Defined in header <typeinfo>
class bad_typeid : public std::exception;
An exception of this type is thrown when a typeid operator is applied to a dereferenced null pointer value of a polymorphic type.
std-bad typeid-inheritance.svg
Inheritance diagram
Member functions
constructor (public member function)
Inherited from std::exception
Member functions
destructor destroys the exception object
[virtual]
what returns an explanatory string
[virtual]
Example
// Run this code
Output: