storing the hash multiplier instead of the hash value

Walter Bright newshound1 at digitalmars.com
Tue Mar 23 15:02:52 PDT 2010


Fawzi Mohamed wrote:
> I think that the public interface should be exposed (or re-exposed) 
> somewhere to the outside so that one can easily create efficient hashes 
> for user defined types.
> For example it is nice to be able to chain hash functions (something 
> that the default one does not allow).

Just overload the toHash() function for your user-defined type to be whatever 
you want it to be.



More information about the Digitalmars-d mailing list