共用方式為


hash 結構

樣板類別以傳回 val.hash_code() 定義它的方法。 方法會定義用來將型別 type_index 的值對應為索引值分布的雜湊函式。

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

請參閱

參考

<typeindex>