std::type_info

From cppreference.com
< cpp‎ | types
 
 
 
Type support
Basic types
Fundamental types
Fixed width integer types (C++11)
Numeric limits
C numeric limits interface
Runtime type information
type_info
(C++11)
Type traits
Type categories
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
Type properties
(C++11)
(C++11)
(C++14)
(C++11)
(C++11)(until C++20)
(C++11)(deprecated in C++20)
(C++11)
Type trait constants
Metafunctions
(C++17)
Endian
(C++20)
Constant evaluation context
Supported operations
Relationships and property queries
(C++11)
(C++11)
Type modifications
(C++11)(C++11)(C++11)
Type transformations
(C++11)
(C++11)
(C++17)
(C++11)(until C++20)(C++17)
 
 
Defined in header <typeinfo>
class type_info;

The class type_info holds implementation-specific information about a type, including the name of the type and means to compare two types for equality or collating order. This is the class returned by the typeid operator.

The type_info class is neither CopyConstructible nor CopyAssignable.

Member functions

(constructor)
[deleted]
has neither default nor copy constructors
(public member function)
[virtual]
derived objects are safe to delete through pointer-to-base
(virtual public member function)
operator=
[deleted]
can not be copy-assigned
(public member function)
checks whether the objects refer to the same type
(public member function)
checks whether the referred type precedes referred type of another type_index
object in the implementation defined order, i.e. orders the referred types
(public member function)
(C++11)
returns a value which is identical for the same types
(public member function)
implementation defined name of the type
(public member function)

See also

wrapper around a type_info object, that can be used as index in associative and unordered associative containers
(class)