標準ライブラリヘッダ <typeindex> - cppreference.com
提供: cppreference.com
このヘッダは型サポートライブラリの一部です。
インクルード | |
(C++20) |
三方比較演算子サポート [edit] |
クラス | |
(C++11) |
連想コンテナおよび非順序連想コンテナでインデックスとして使用できる、 type_info オブジェクトのラッパー (クラス) [edit] |
(C++11) |
std::type_index に対するハッシュサポート (クラステンプレートの特殊化) [edit] |
前方宣言 | |
ヘッダ | |
(C++11) |
ハッシュ関数オブジェクト (クラステンプレート) [edit] |
概要
#include <compare> namespace std { class type_index; template<class T> struct hash; template<> struct hash<type_index>; }
Class 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. }; }