1

I trying to implement generic hash table and i need to ensure that there is a defined hash function for this generic type.

Something like this

template<typename T>
class HashTable{
    public:
    HashTable(){
        static_assert(is_defined<hash<T>>(),
                  "There is no implementation for hash<T> ...");
        //...
    }
    //...
};

How i should implement is_defined method or how should i replace it?

Kemsikov
  • 452
  • 3
  • 13

0 Answers0