The boost::hash_combine template function takes a reference to a hash (called seed) and an object v. According to the docs, it combines seed with the hash of v by
seed ^= hash_value(v) + 0x9e3779b9 + (seed << 6) + (seed >> 2);
I can see that this is deterministic. I see why a XOR is used.
I bet the addition helps in mapping similar values widely apart so probing hash tables won't break down, but can someone explain what the magic constant is?
 
     
     
     
     
    
seed ^= hash_value(v) + 0x9e3779b9 + rotl(seed, 6) + rotr(seed, 2);– John Yates Jun 02 '16 at 20:54