std::type_index
From cppreference.com
Template:cpp/types/type index/sidebar
Template:ddcl list begin <tr class="t-dsc-header">
<td>Defined in header
</td>
<typeindex>
<td></td> <td></td> </tr> <tr class="t-dcl ">
<td >class type_index;
</td>
<td class="t-dcl-nopad"> </td> <td > (since C++11) </td> </tr> Template:ddcl list end
The type_index
class is a wrapper class around a Template:cpp 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
is Template:concept and Template:concept.
Member functions
constructs the object (public member function) | |
(removed in C++20)(C++20) |
compares the underlying std::type_info objects (public member function) |
returns hashed code (public member function) | |
returns implementation defined name of the type, associated with underlying type_info object (public member function) |
Helper classes
(C++11) |
hash support for std::type_index (class template specialization) |
See also
contains some type’s information, the class returned by the typeid operator (class) |