There is one trick you can use that will at least keep you working by default, but this requires that you know the type name as defined in hash_map .
The hash_map file is likely to be declared as:
class allocator {}; class hash_compare {}; template<typename Key , typename T , typename HashCompare = hash_compare , typename Allocator = allocator> class hash_map { public: typedef HashCompare key_compare;
We cannot leave the default value for the hash, but we can refer to the default value using the typedef member:
hash_map<EntityId , Entity* , hash_map<EntityId,Entity*>::key_compare
If you are going to use this type a lot, then create a typedef:
typedef hash_map<EntityId,Entity*>::key_compare EntityKeyCompare; hash_map<EntityId , Entity* , EntityKeyCompare , tbb::scalable_allocator> hm;
source share