Bagikan melalui


Struktur hash

Templat kelas mendefinisikan metodenya sebagai mengembalikan val.hash_code(). Metode ini mendefinisikan fungsi hash yang digunakan untuk memetakan nilai jenis type_index ke distribusi nilai indeks.

Sintaks

template <> struct hash<type_index>
: public unary_function<type_index, size_t>
{ // hashes a typeinfo object
    size_t operator()(type_index val) const;
};

Jenis Khusus

<system_error>

template <class T> struct hash;
template <> struct hash<error_code>;
template <> struct hash<error_condition>;

Baca juga

<typeindex>