Standard library header <typeindex> (C++11)

From cppreference.com

This header is part of the

type support

library.

Includes

<compare>

(C++20)

Three-way comparison operator

support

[edit]

Classes

type_index

(C++11)

wrapper around a

std::type_info

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

[edit]

std::hash<std::type_index>

(C++11)

hash support for

std::type_index

(class template specialization)

[edit]

Forward declarations Defined in header

<functional>

hash

(C++11)

hash function object
(class template)

[edit]

Synopsis

#include<compare>namespacestd{classtype_index;template<classT>structhash;template<>structhash<type_index>;}Class

std::type_index

namespacestd{classtype_index{public:type_index(consttype_info&rhs)noexcept;booloperator==(consttype_index&rhs)constnoexcept;booloperator<(consttype_index&rhs)constnoexcept;booloperator>(consttype_index&rhs)constnoexcept;booloperator<=(consttype_index&rhs)constnoexcept;booloperator>=(consttype_index&rhs)constnoexcept;strong_orderingoperator<=>(consttype_index&rhs)constnoexcept;size_thash_code()constnoexcept;constchar*name()constnoexcept;private:consttype_info*target;// exposition only// Note that the use of a pointer here, rather than a reference,// means that the default copy/move constructor and assignment// operators will be provided and work as expected.};}