namespace std { template struct hash> { size_t operator() (const MyClass& c) const; } } // You can also do things like template class type> func_name>();