std::type_index

From Cppreference

Jump to: navigation, search
Defined in header <typeindex>

class type_index;
(C++11 feature)

The type_index class is a wrapper class around a type_info object, that can be used as index in associative and unordered associative containers. The relationship with type_info object is maintained through a pointer, therefore type_index can be copy-constructed and copy-assigned.

(constructor)
constructs the object
(public member function)
operator==
operator!=
operator<
operator<=
operator>
operator>=
compares the underlying type_info objects
(public member function)
hash_code
returns hashed code
(public member function)
name
returns implementation defined name of the type,
associated with underlying type_info object
(public member function)

[edit] Helper classes

std::hash<std::type_index> (C++11)
hash support for std::type_index
(class template specialization)

[edit] See also

type_info
contains some type's information, generated by the implementation.
This is the class, returned by the typeid operator
(class)