
14 Mar
2005
14 Mar
'05
12:41 p.m.
Daniel James wrote:
If you use unordered_set<base*> then the hash function will be called for the pointer, not the class. If you use unordered_set<boost::shared_ptr<base> >, then it depends on how Peter implements the hash function for shared_ptr, but I expect it will be the pointer again.
It will have to be the pointer, since the key has to be const. Only a hash function for a 'deep-const' pointer will be able to use the pointee.