When using the boost library, the fuction boost::hash_combine
works like this:
seed ^= hash_value(v) + 0x9e3779b9 + (seed << 6) + (seed >> 2);
http://www.boost.org/doc/libs/1_46_1/doc/html/hash/reference.html#boost.hash_combine
What is the advantage of this approach vs simply XOR-ing?
With XOR-ing, one can even use the hash function to use unordered containers as keys, while this one is order dependent.