Namespaces
Variants
Views
Actions

std::type_index

From cppreference.com
< cpp‎ | types
Revision as of 14:58, 2 November 2012 by P12bot (Talk | contribs)

 
 
 
Type support
Basic types
Fundamental types
Fixed width integer types (C++11)
Numeric limits
C numeric limits interface
Runtime type information
type_index
(C++11)
Type traits
Primary 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++11)
(C++14)
Supported operations
Relationships and property queries
(C++11)
(C++11)
(C++11)
(C++11)
Type modifications
(C++11)(C++11)(C++11)
Type transformations
(C++11)
(C++11)
(C++11)
Type trait constants
 
 

Template:ddcl list begin <tr class="t-dsc-header">

<td>
Defined in header <typeindex>
</td>

<td></td> <td></td> <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 std::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 is CopyConstructible and CopyAssignable.

Member functions

constructs the object
(public member function) [edit]
compares the underlying std::type_info objects
(public member function) [edit]
returns hashed code
(public member function) [edit]
returns implementation defined name of the type,
associated with underlying type_info object
(public member function) [edit]

Helper classes

hash support for std::type_index
(class template specialization) [edit]

See also

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