You can specialize a hash for certain types. See here and here , for example. like this
namespace std { template <> struct hash<Foo> { size_t operator()(const Foo & x) const { } }; }
If you think you can do better than library developers for existing versions, you are either 1. incorrect or 2. smart
source share