Standardbibliothek-Header <typeindex> (C++11)
Von cppreference.com
Dieser Header ist Teil der Typ-Unterstützungs-Bibliothek.
Includes | ||
| (C++20) |
Unterstützung für den Drei-Wege-Vergleichsoperator | |
Klassen | ||
| (C++11) |
Wrapper um ein type_info-Objekt, das als Index in assoziativen und ungeordneten assoziativen Containern verwendet werden kann(Klasse) | |
| (C++11) |
Hash-Unterstützung für std::type_index (Klassentemplate-Spezialisierung) | |
Vorwärtsdeklarationen | ||
| Definiert in der Header-Datei
<functional> | ||
| (C++11) |
Hash-Funktionsobjekt (Klassenvorlage) | |
[bearbeiten] Synopsis
#include <compare> namespace std { class type_index; template<class T> struct hash; template<> struct hash<type_index>; }
[bearbeiten] Klasse std::type_index
namespace std { class type_index { public: type_index(const type_info& rhs) noexcept; bool operator==(const type_index& rhs) const noexcept; bool operator< (const type_index& rhs) const noexcept; bool operator> (const type_index& rhs) const noexcept; bool operator<=(const type_index& rhs) const noexcept; bool operator>=(const type_index& rhs) const noexcept; strong_ordering operator<=>(const type_index& rhs) const noexcept; size_t hash_code() const noexcept; const char* name() const noexcept; private: const type_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. }; }