Scroll to navigation

std::type_info(3) C++ Standard Libary std::type_info(3)

NAME

std::type_info - std::type_info

Synopsis


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 has neither default nor copy constructors
[deleted] (public member function)
destructor the virtual destructor makes type_info a polymorphic class
[virtual] (virtual public member function)
operator= can not be copy-assigned
[deleted] (public member function)
operator== checks whether the objects refer to the same type
operator!= (public member function)
(removed in C++20)
checks whether the referred type precedes referred type of
another type_info
before object in the implementation defined order, i.e. orders the
referred types
(public member function)
hash_code returns a value which is identical for the same types
(C++11) (public member function)
name implementation defined name of the type
(public member function)

See also


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

2022.07.31 http://cppreference.com