Hash_fun

<hash_fun> declares a templated struct which serves as a function object named hash. This is the default hash function for all hash containers. As supplied, hash works for integral types, basic_string types, and char* types (c-strings).

Note: This header is non-standard. The classes herein are offered as extensions to the C++ standard. They are marked as such by the namespace Metrowerks.

Client code can specialize hash to work for other types.

Alternatively, client code can simply supply customized hash functions to the hash containers via the template parameters.

The returned size_t should be as evenly distributed as possible in the range [0, numeric_limits<size_t>::max()]. Logic in the hash containers will take care of folding this output into the range of the current number of buckets.