std:: hash <std::type_index>
From cppreference.net
<
cpp
|
types
|
type index
C++
Utilities library
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Type support
| Basic types | |||||||||||||||||||||
| Fixed width integer types (C++11) | |||||||||||||||||||||
| Fixed width floating-point types (C++23) | |||||||||||||||||||||
|
|||||||||||||||||||||
| Numeric limits | |||||||||||||||||||||
| C numeric limits interface | |||||||||||||||||||||
| Runtime type information | |||||||||||||||||||||
|
|||||||||||||||||||||
std::type_index
| Member functions | ||||
| Helper classes | ||||
|
hash
<std::type_index>
(C++11)
|
|
ヘッダーで定義
<typeindex>
|
||
|
template
<>
struct
hash
<
std::
type_index
>
;
|
(C++11以降) | |
std::hash の std::type_index に対するテンプレート特殊化は、 std::type_index 型のオブジェクトのハッシュ値をユーザーが取得することを可能にします。
メンバー関数 operator ( ) は、 hash_code() と実質的に同じ値を返します。
関連項目
|
ハッシュコードを返す
(公開メンバ関数) |