27 Aug
2010
27 Aug
'10
7:08 p.m.
On 27 August 2010 18:53, Hossein Haeri
Dear all,
Should not the program in the P.S. output "I got used!"? If not, how can I ensure that it's size_t hash_value(B*) which gets called upon use of bPtrHasher's operator()?
I don't know, my ADL knowledge is a bit rusty, but you shouldn't be doing that anyway. 'boost::hash' is designed to be used alongside 'std::equal_to'. For pointers it uses the standard pointer equality comparison, so 'boost::hash' should be using the standard hash function to match it. If you want to use a different hash algorithm, than you should use your own hash class, just as if you wanted to for integers. Daniel