template <> struct hash<type_index>;
Для объекта index типа type_index, hash<type_index>()(index) должен оценить к тому же результату , как index.hash_code().