我希望能够生成一个URL的唯一哈希键。
目前我正在使用Boost哈希。
std::size_t seed = 0;
boost::hash_combine(seed, host);
boost::hash_combine(seed, path);
boost::hash_combine(seed, query);
boost::hash_combine(seed, fragment);
但是哈希键很常见地出现重复... :(
http://www.finanzen.de/geldanlage-boerse.html 9223372036854775807
http://www.finanzen.de/geldanlage-china.html 9223372036854775807
有没有简单的替代方案?
host
、path
和其他类型有哪些? - Mat