I have following class
class hash_key {
public:
int get_hash_value(std::string &inStr, int inSize) const {
int hash = 0;
for(int i = 0; i < (int)inStr.size(); i++) {
int val = (int)inStr[i];
hash = (hash * 256 + val) % inSize;
}
return hash;
}
};
I want to pass it to my another template class so that I can call get_hash_value
how to do that is there any way to achieve the same using operator()()
Something like this: