• Mark OLESEN's avatar
    ENH: improve hashing overloads of string-types and HashTable/HashSet · 95cd8ee7
    Mark OLESEN authored and Andrew Heather's avatar Andrew Heather committed
    - additional dummy template parameter to assist with supporting
      derived classes. Currently just used for string types, but can be
      extended.
    
    - provide hash specialization for various integer types.
      Removes the need for any forwarding.
    
    - change default hasher for HashSet/HashTable from 'string::hash'
      to `Hash<Key>`. This avoids questionable hashing calls and/or
      avoids compiler resolution problems.
    
      For example,
      HashSet<label>::hasher and labelHashSet::hasher now both properly
      map to Hash<label> whereas previously HashSet<label> would have
      persistently mapped to string::hash, which was incorrect.
    
    - standardize internal hashing functors.
    
      Functor name is 'hasher', as per STL set/map and the OpenFOAM
      HashSet/HashTable definitions.
    
      Older code had a local templated name, which added unnecessary
      clutter and the template parameter was always defaulted.
      For example,
    
          Old:  `FixedList<label, 3>::Hash<>()`
         ...
    95cd8ee7