
1 Dec
2011
1 Dec
'11
2:46 p.m.
On 1 December 2011 14:05, Daniel James
You should probably be including something representing the dynamic type in the hash value, but that depends on how you implement 'operator==' for FooList. If you don't then defining 'hash_value' doesn't make much sense.
Sorry, that wasn't clear. I meant, "If you don't define operator== then defining hash_value doesn't make much sense". This is because 'boost::hash' implements a hash value for the equivalence relation defined by 'std::equal_to'. You need to establish what 'operator==' does in order to know what 'hash_value' should do.