I do not think there is an error in this code. The hash values are different from this dummy example:
#include <boost/functional/hash.hpp>
#include <cstdio>
int main()
{
size_t seed = 0;
std::string s1("www.finanzen.de");
std::string s2("geldanlage-boerse.html");
std::string s3("geldanlage-china.html");
boost::hash_combine(seed, s1);
boost::hash_combine(seed, s2);
fprintf(stdout, "%016lx\n", seed);
seed = 0;
boost::hash_combine(seed, s1);
boost::hash_combine(seed, s3);
fprintf(stdout, "%016lx\n", seed);
return 0;
}
Now, if yours host, pathetc. are char*s, and you reuse these pointers, then the result you get becomes sensitive. No overload hash_valuefor char*. Thus, the only thing that goes into the calculation is the value of the pointer itself (just like it is not defined). (See the bottom of the hash link .)
: 9223372036854775807 . :
0x7fffffffffffffff
, , / -, , .