C++ Library - <typeinfo>


Advertisements

Introduction

It defines in header and related to operators typeid and dynamic_cast.

Declaration

Following is the declaration for std::type_info.

class type_info;

C++11

class type_info;

Types

Sr.No. Type & description
1 type_info

It contains type information.

2 bad_cast

It throws an exception on failure to dynamic cast.

3 bad_typeid

It throws an exception on typeid of null point.

Advertisements